[hackers] [wmii] Handle 'wmiir setsid' with no arguments gracefully. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Wed, 11 Mar 2009 21:20:33 +0000 (UTC)

changeset: 2438:78df6f8ac4b9
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Mar 11 17:20:08 2009 -0400
files: cmd/wmiir.c
description:
Handle 'wmiir setsid' with no arguments gracefully.

diff -r 9f1e7f8e041a -r 78df6f8ac4b9 cmd/wmiir.c
--- a/cmd/wmiir.c Thu Mar 05 22:31:03 2009 -0500
+++ b/cmd/wmiir.c Wed Mar 11 17:20:08 2009 -0400
@@ -342,6 +342,8 @@
         }ARGEND;
         if(av0 == nil)
                 av0 = argv[0];
+ if(av0 == nil)
+ return 1;
 
         setsid();
         execvp(av0, argv);
Received on Wed Mar 11 2009 - 21:20:33 UTC

This archive was generated by hypermail 2.2.0 : Wed Mar 11 2009 - 21:24:04 UTC