James Hunt has proposed merging lp:~jamesodhunt/upstart/test-upstart-name into 
lp:upstart.

Requested reviews:
  Upstart Reviewers (upstart-reviewers)

For more details, see:
https://code.launchpad.net/~jamesodhunt/upstart/test-upstart-name/+merge/195238
-- 
https://code.launchpad.net/~jamesodhunt/upstart/test-upstart-name/+merge/195238
Your team Upstart Reviewers is requested to review the proposed merge of 
lp:~jamesodhunt/upstart/test-upstart-name into lp:upstart.
=== modified file 'ChangeLog'
--- ChangeLog	2013-11-14 14:28:26 +0000
+++ ChangeLog	2013-11-14 15:20:21 +0000
@@ -1,5 +1,12 @@
 2013-11-14  James Hunt  <[email protected]>
 
+	* test/test_util_common.c: _start_upstart(): Set name to
+	  "test_init" for consistency with TEST_DBUS() and to make it
+	  easier to avoid killing non-test Session Inits when developing
+	  new tests.
+
+2013-11-14  James Hunt  <[email protected]>
+
 	* NEWS: Release 1.11
 
 2013-11-13  James Hunt  <[email protected]>

=== modified file 'test/test_util_common.c'
--- test/test_util_common.c	2013-11-12 12:17:30 +0000
+++ test/test_util_common.c	2013-11-14 15:20:21 +0000
@@ -489,8 +489,11 @@
 	TEST_NE (*pid = fork (), -1);
 
 	if (! *pid) {
-		int fd;
+		char  *argv0;
+		int    fd;
+
 		nih_signal_reset ();
+
 		sigprocmask (SIG_SETMASK, &orig_set, NULL);
 
 		if (! getenv ("UPSTART_TEST_VERBOSE")) {
@@ -501,7 +504,14 @@
 			assert (dup2 (fd, STDERR_FILENO) != -1);
 		}
 
-		assert (execv (argv[0], argv) != -1);
+		argv0 = argv[0];
+
+		/* Make the process stand out from existing non-test
+		 * Session Init processes.
+		 */
+		argv[0] = "test_init";
+
+		assert (execvp (argv0, argv) != -1);
 	}
 
 	sigprocmask (SIG_SETMASK, &orig_set, NULL);

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to