DEFUN ("haiku-roster-launch", Fhaiku_roster_launch, Shaiku_roster_launch,
2, 2, 0,
doc: /* Launch an application associated with FILE-OR-TYPE.
-Return the process ID of the application, or nil if no application was
-launched.
+Return the process ID of any process created, the symbol
+`already-running' if ARGS was sent to a program that's already
+running, or nil if launching the application failed.
FILE-OR-TYPE can either be a string denoting a MIME type, or a list
with one argument FILE, denoting a file whose associated application
&team_id);
unblock_input ();
+ /* `be_roster_launch' can potentially take a while in IO, but
+ signals from async input will interrupt that operation. If the
+ user wanted to quit, act like it. */
+ maybe_quit ();
+
if (rc == B_OK)
return SAFE_FREE_UNBIND_TO (depth,
make_uint (team_id));
+ else if (rc == B_ALREADY_RUNNING)
+ return Qalready_running;
return SAFE_FREE_UNBIND_TO (depth, Qnil);
}
DEFSYM (Qsize_t, "size_t");
DEFSYM (Qssize_t, "ssize_t");
DEFSYM (Qpoint, "point");
+ DEFSYM (Qalready_running, "already-running");
defsubr (&Shaiku_selection_data);
defsubr (&Shaiku_selection_put);