Bug 77 - Trap and sudo
Trap and sudo
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.5
HP HP-UX
: high high
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-15 05:03 MDT by jose.pinto
Modified: 2002-12-13 15:23 MST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jose.pinto 2002-04-15 05:03:47 MDT
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.
Comment 1 Todd C. Miller 2002-12-13 11:23:51 MST
This will be fixed in the next version of sudo.