Browse Source

adjust to code style

pull/26/head
Nils 4 years ago
parent
commit
50a69818a7
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/nsmd.cpp

+ 2
- 3
src/nsmd.cpp View File

@@ -325,7 +325,7 @@ handle_client_process_death ( int pid )
{
Client *c = get_client_by_pid( (int)pid );

if ( c != NULL)
if ( c )
{
//There is a difference if a client quit on its own, e.g. via a menu or window manager,
//or if the server send SIGTERM as quit signal. Both cases are equally valid.
@@ -395,14 +395,13 @@ void handle_sigchld ( )
//One child process has stopped. Find which and figure out the stop-conditions
Client *c;
c = get_client_by_pid( pid );
if ( c != NULL )
if ( c )
{
//The following will not trigger with normal crashes, e.g. segfaults or python tracebacks
if ( WIFEXITED( status ) ) // returns true if the child terminated normally
if ( WEXITSTATUS(status) == 255 ) // as given by exit(-1) in launch()
c->launch_error = true;
}

// Call even if Client was already null. This will check itself again and was expected
// to be called for the majority of nsmds development
handle_client_process_death( pid );


Loading…
Cancel
Save