Bugzilla – Bug 77
Trap and sudo
Last modified: 2002-12-13 15:23:51 MST
I have a shell script with : ######################################### ... trap "" 2 ... ... nohup /opt/sudo/bin/sudo -u confmngr $OCMS_TOOL/ckout.pl $HOME $LOGNAME .... ######################################### The problem is: If we want control my process with trap instruction, it not works properly with sudo. When I execute my script and if I press ctrl c, the processing of ckout.pl not stop, but some instructions inside the ckout.pl script are stopped. Imagine, my ckout.pl script do for example the following instructions: ...print "hello \n"; ...chmod(000,file2); ...print "end"; And if i press ctrl c immediately the starting of the first print (because print is not a only one instructions in assembler), and stop press it only after chmod start, the ckout.pl process not stop and the instruction print hello and chmod are not perform. But the last operation could be performed.
This will be fixed in the next version of sudo.