Search code examples
shellunixkillresume

Resume a killed job on shell UNIX


long story short I aborted my Shell process pressing ctrl+C by mistake (I wanted to press ctrl+Z to stop it). It's a simulation that lasted for 50 hours and I killed it just before it finished :'(

Is there by any chance a way of resuming it ? I couldn't find any on the internet but I strongly hope someone among you have a solution... I'm using a MacOS.

Thanks,

Pierre


Solution

  • It is impossible to resume something which has been terminated.

    The only possibility you have (had) is by foreseeing this: you create a process, which has a starting point (let's say 1, so you launch ./process 1) and there is a way to know the last point your program has reached (event log, normal logfile, ...), let's say that you have stopped your process at value 100. You can then restart your process at value 100 (./process 100) but beware: this is not resuming, but starting another instance of that process.