Thread View: comp.bugs.misc
1 messages
1 total messages
Started by Richard Doty
Tue, 02 Feb 1988 21:46
Korn shell leaves phantom jobs -BSD
Author: Richard Doty
Date: Tue, 02 Feb 1988 21:46
Date: Tue, 02 Feb 1988 21:46
24 lines
1372 bytes
1372 bytes
Subject: Korn shell leaves phantom jobs -BSD Index: sh/jobs.c Description: If a korn shell with the monitor option set is interrupted during a macro expansion (e.g. eval `tset -Tvt100 ...` ), a job is left on the jobs stack. This is a "pipejob" so 'jobs' does not see it, but if this happens to a login shell (perhaps while processing your .profile), you will get the "you have running jobs" message when you try to log out. Repeat-By: Put a macro expansion in your .profile, and interrupt it while logging in. Then try to log out. Fix: The fix I use is to have list_jobs detect the case where a pipejob has been waited for (the NOTIFY bit is set), but has no associated job leader (job_bynum() returns NULL). If that happens, I assume it is a bogus job table entry, and unpost it. This still looks like a kludge, but I think it is because of the dual use of the P_PIPEJOB flag - these macro jobs shouldn't be post()ed in the first place.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads