Operating System - HP-UX
1836645 Members
1725 Online
110102 Solutions
New Discussion

Different behavior in two login sessions

 
Leslie Chaim
Regular Advisor

Different behavior in two login sessions

Hi,

Here is a seris of commands, which I ran at the interactive shell (KSH).

prog arg1 arg2 > log 2> err &
tail ???f err

I hit Ctrl C to terminate the tail ???f and prog terminated prematurely. I verified that via the message from the prog app. I repeated the above steps three times and each time the application stopped execution when I hit Ctrl C to stop the tail ???f. This behavior appeared strange to me.

I logged out and started a new session with no problems. I am trying to figure out why I had a problem in the first session.

I remember doing something with the set ???o options in the first session particularly with notify and monitor. Nevertheless, I could not get the behavior from the first session.

Any ideas?

Thanks,
Leslie
If life serves you lemons, make lemonade
1 REPLY 1
Tom Geudens
Honored Contributor

Re: Different behavior in two login sessions

Hi,
You might take a look at the man pages for the ksh. I found the following :
"Jobs ... If the monitor option of the set command is turned on, an interactive shell associates a job with each pipeline ..."

The explanation continues for a while, and then goes on to ...
"Signals ... The INT and QUIT signals for an invoked command are ignored if the command is followed by & and the monitor option is off. Otherwise, signals have the values inherited by the shell from its parent, with the exception of signal 11 (but see also the trap command below) ..."

Which (in my poor understanding of the ksh) may mean that hitting CTRL-C would send a signal to ALL "jobs" running under the shell if the monitor is on ...

Hope this helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?