X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fstartup.c;h=6302d811e3b4b3688ff59cc8bbfe7108edcfc390;hb=07dfb8450bfaf90d86b220b671997d322d325a85;hp=2a6bc0026a06a29dd2c4c04996f8066a3cdf6995;hpb=63d0823016f6ca2f1eae6903a9896097e9c5d4a5;p=i3%2Fi3 diff --git a/src/startup.c b/src/startup.c index 2a6bc002..6302d811 100644 --- a/src/startup.c +++ b/src/startup.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "startup.c" /* * vim:ts=4:sw=4:expandtab * @@ -13,6 +11,7 @@ * */ #include "all.h" + #include "sd-daemon.h" #include @@ -50,6 +49,7 @@ static void startup_timeout(EV_P_ ev_timer *w, int revents) { if (!sequence) { DLOG("Sequence already deleted, nevermind.\n"); + free(w); return; } @@ -95,7 +95,7 @@ static int _prune_startup_sequences(void) { return active_sequences; } -/** +/* * Deletes a startup sequence, ignoring whether its timeout has elapsed. * Useful when e.g. a window is moved between workspaces and its children * shouldn't spawn on the original workspace. @@ -118,10 +118,10 @@ void startup_sequence_delete(struct Startup_Sequence *sequence) { } /* - * Starts the given application by passing it through a shell. We use double fork - * to avoid zombie processes. As the started application’s parent exits (immediately), - * the application is reparented to init (process-id 1), which correctly handles - * childs, so we don’t have to do it :-). + * Starts the given application by passing it through a shell. We use double + * fork to avoid zombie processes. As the started application’s parent exits + * (immediately), the application is reparented to init (process-id 1), which + * correctly handles children, so we don’t have to do it :-). * * The shell used to start applications is the system's bourne shell (i.e., * /bin/sh). @@ -191,7 +191,7 @@ void start_application(const char *command, bool no_startup_id) { if (!no_startup_id) sn_launcher_context_setup_child_process(context); - execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, (void *)NULL); + execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, NULL); /* not reached */ } _exit(0); @@ -257,7 +257,7 @@ void startup_monitor_event(SnMonitorEvent *event, void *userdata) { } } -/** +/* * Renames workspaces that are mentioned in the startup sequences. * */ @@ -273,7 +273,7 @@ void startup_sequence_rename_workspace(const char *old_name, const char *new_nam } } -/** +/* * Gets the stored startup sequence for the _NET_STARTUP_ID of a given window. * */