How to make one proc command another?

Roger `ANJOU' Dubar cigp03 at vaxa.strath.ac.uk
Fri Feb 1 00:17:16 AEST 1991


Hope you guys can help!!

***--> i'm working on a program to log straight out of a workstation from
X-windows on our SUN3s...

To avoid the program dieing along with X-windows, I ``nohup'' it...
As is stands the process kills X, waits for it to die, runs the users .logout 
if it exists, and then kills all remaining relevant processes (it leaves up 
processes owned by the same user but remote-logged in from a different host.)
The process then kills itself...

Hardly difficult stuff, i hear you cry; but i still have a problem. The program
as it stands leaves /etc/utmp unaffected, so the logging-out-user still appears
in a `who' listing. I would guess that this is because I am killing the users
basic process from an outsied (nohup'ed) process.... This is obviously
undesirable!!

SO can i force an update of /etc/utmp somehow?? or better, can i un-nohup the
process so it can force a normal logout, or best can i make the nohup'ed
process force the users basic shell to execute a normal logout???

I'm sure there must be a way of making one process you own supply commands to
another process you own to execute... anyone care to provide a demo of how to
do it??

Shell script or C, it don't really matter which...

		thanks in advance,
				  				Roger..
-- 
JANET			     INTERNET
r.dubar at uk.ac.strath.vaxa or r.dubar%vaxa.strath.ac.uk at nsfnet-relay.ac.uk
Roger Dubar, (Anjou), The Law School, Strathclyde University, Glasgow, Scotland.
"They call these things WORKstations?"



More information about the Comp.unix.questions mailing list