[patch] make dbus-launch export vars, usage bits

Havoc Pennington hp@redhat.com
Sat, 17 May 2003 13:51:38 -0400


Looks good to commit, minor comments follow.
Thanks a lot.
       if (!strcmp (arg, "--session"))

This looks like only 1 space indentation, but I think it must be 
diff playing with our minds, since the current source looks right.

+	{
+	  runprog = strdup (arg);

strdup() is unfortunately not portable - I'd just cut-and-paste 
dbus_strdup into dbus-launch (appropriately un-dbus-ing it).

+         if (!strncmp (shname + strlen(shname) -3, "csh", 3))

space before parens ;-)

+	  char *envvar = malloc (strlen ("DBUS_SESSION_BUS_ADDRESS=") + FILENAME_MAX + 1);
+	  char **args = malloc (sizeof (char *) *

I can live with "foo = NULL" inline but this much stuff in the
variable declaration bugs me somewhat.

The Hurd people are going to come after you for using FILENAME_MAX you
know ;-) it probably would be better anyhow to just go ahead and
strlen the bus_address, since the address is not inherently a

+.I "--version"
+Print the version of dbus-launch
+.I "--sh-syntax"
+Emit Bourne-shell compatible code.
+.I "--csh-syntax"
+Emit csh compatible code.
+.I "--auto-syntax"
+Attempt to detect the shell in use, and emit compatible code.

We should probably alphabetize these options.