summaryrefslogtreecommitdiffstats
path: root/sesman/sesman.c
diff options
context:
space:
mode:
authorilsimo <ilsimo>2007-03-25 14:57:08 +0000
committerilsimo <ilsimo>2007-03-25 14:57:08 +0000
commit5d29a7127bf08027d7c4b1f226505e2ee854fd3b (patch)
tree0587a43a780296749489c373ce93d08b097dc51f /sesman/sesman.c
parentfd8ce33f59f8be0942aa90443085578b937c542b (diff)
downloadxrdp-proprietary-5d29a7127bf08027d7c4b1f226505e2ee854fd3b.tar.gz
xrdp-proprietary-5d29a7127bf08027d7c4b1f226505e2ee854fd3b.zip
fixes bug #1595324 in sf.net bugtracker
Diffstat (limited to 'sesman/sesman.c')
-rw-r--r--sesman/sesman.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sesman/sesman.c b/sesman/sesman.c
index 3dc96881..b3f83f9c 100644
--- a/sesman/sesman.c
+++ b/sesman/sesman.c
@@ -148,9 +148,11 @@ main(int argc, char** argv)
}
error = g_file_read(fd, pid_s, 7);
- if (0 != error)
+ if (-1 == error)
{
g_printf("error reading pid file: %s\n", g_get_strerror());
+ g_file_close(fd);
+ g_exit(error);
}
g_file_close(fd);
pid = g_atoi(pid_s);