Problem: A process (exe) is getting executed in background. The output of this process is getting logged in a file. After successfully running for some time the process gets terminated. In the log file following is present:
^M[7m Interrupt ^M[27m
Please note that this does not happen all the time and can be taken as once in a blue moon scenario.
if 7 and 27 are signals then 7 is for abort and 27 is for sigttin (used kill -l).
It would be good if some pointers can be given around the same. Need to know how these signals are getting generated and why they do not appear all the time. Any reference material would also help. Thank you
The requestor's log file entry has nothing to do with signals; it's just setting "display" to reverse video, outputs "interrupt", and resets to normal video (given that ^M stands for "Escape", which, I admit, may be a wild assumption).
Interrupt is interesting here. SIGINT will generate that response as it is the name most systems "give" to that signal number (note: actual number may vary)
This is different from a driver interrupt - where a thread's current registers are pushed onto an interrupt stack. This appears to be a signal. And signals do cause asynchronous interrupts and process termination if they are not handled as part of the process signal mask.
IMO: The problem is the code being executed. The point is something appears to be generating a SIGINT that goes unhandled in the process.
Since you state nothing about what is running....
Add a diagnostic signal handler to the code java, C, perl, etc., ( or a trap statement in shell) to tell when/where it happens. Also note - a process can call raise() in code or kill in shell to send a signal to itself, which is another avenue to explore.
To be precise I m using SunOS 5.8...I couldn't fine man cosole_codes.. Also..I have missed to quote the exact error above...apologies for that...the error is as below:
^M == <CR>, 0x0D...
^[ == Esc, 0x1B...
[7m == Reverse Video...
" Interrupt " == Purely a warning print to the window/screen in reverse video including spaces.
^[ == Esc, 0x1B...
[27m == Normal video...
Perfectly normal piece of *NIX shell scripting I would have thought, except it looks as though it is generated on a Windows machine because of the ^M part.