diff options
author | Paulo R. Zanoni <paulo@c3sl.ufpr.br> | 2008-09-12 08:33:23 -0300 |
---|---|---|
committer | Paulo R. Zanoni <paulo@c3sl.ufpr.br> | 2008-09-12 08:33:23 -0300 |
commit | 4e548c380da84d54a650873c9849b8881ab0fa25 (patch) | |
tree | 9352b20c1abbce902b1172c081ce26ead60c532f | |
parent | 68b6cbf5788e4843cec9e4d19905ba2977bd713d (diff) |
Don't kill if pidfile doesn't exist.
-rwxr-xr-x | mdm/src/mdm-start-seat | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mdm/src/mdm-start-seat b/mdm/src/mdm-start-seat index e7edcbf..4fdd1fe 100755 --- a/mdm/src/mdm-start-seat +++ b/mdm/src/mdm-start-seat @@ -45,8 +45,10 @@ function open_seat_parent_window () { # The first parameter given to this function must be [width]*n, where n is # a multiplier that gives the coordinates to correctly open # seat_parent_window. This number is also used on names of files. - kill `cat ${MDM_PIDS}/seat-parent-window${DISPLAY}-$1.pid 2> /dev/null` - rm -f ${MDM_PIDS}/seat-parent-window${DISPLAY}-$1.pid 2> /dev/null + if [ -f "${MDM_PIDS}/seat-parent-window${DISPLAY}-$1.pid" ]; then + kill `cat ${MDM_PIDS}/seat-parent-window${DISPLAY}-$1.pid` 2> /dev/null + rm -f ${MDM_PIDS}/seat-parent-window${DISPLAY}-$1.pid 2> /dev/null + fi $SEAT_PARENT_WINDOW $MY_SCREEN_SIZE+$1+0 seat-parent-window$DISPLAY-$1 & PID=$! |