Detect crashing application in a script

Hi there.

I'm trying to find a way how to determine if an app has crashed during execution(in particular ffmpeg) or finished as supposed to.

Basically during conversion ffmpeg coredumps and messes up next steps... The echo $? will always return 0. I need to detect this kind of crashes... is there any way?

I think I need some kind of wrapper... but I cannot find anything I could use so far, I don't have much experience with this kind of problems.

Thanks.
 
Strange. sh manpage tells:
Code:
     If a command is terminated by a signal, its exit status is 128 plus the
     signal number.  Signal numbers are defined in the header file
     <sys/signal.h>.

And indeed:
Code:
> ./test ; echo $?
Segmentation fault (core dumped)
139
 
Back
Top