|
Lines 256-273
Link Here
|
| 256 |
int fd = open( tty, O_WRONLY ); |
256 |
int fd = open( tty, O_WRONLY ); |
| 257 |
if( fd < 0 ) |
257 |
if( fd < 0 ) |
| 258 |
{ |
258 |
{ |
| 259 |
fprintf(stderr, "[tdeinit] couldn't open() %s: %s\n", tty, strerror (errno) ); |
259 |
fprintf(stderr, "[tdeinit] Couldn't open() %s: %s\n", tty, strerror (errno) ); |
| 260 |
return; |
260 |
return; |
| 261 |
} |
261 |
} |
| 262 |
if( dup2( fd, STDOUT_FILENO ) < 0 ) |
262 |
if( dup2( fd, STDOUT_FILENO ) < 0 ) |
| 263 |
{ |
263 |
{ |
| 264 |
fprintf(stderr, "[tdeinit] couldn't dup2() %s: %s\n", tty, strerror (errno) ); |
264 |
fprintf(stderr, "[tdeinit] Couldn't dup2() %s: %s\n", tty, strerror (errno) ); |
| 265 |
close( fd ); |
265 |
close( fd ); |
| 266 |
return; |
266 |
return; |
| 267 |
} |
267 |
} |
| 268 |
if( dup2( fd, STDERR_FILENO ) < 0 ) |
268 |
if( dup2( fd, STDERR_FILENO ) < 0 ) |
| 269 |
{ |
269 |
{ |
| 270 |
fprintf(stderr, "[tdeinit] couldn't dup2() %s: %s\n", tty, strerror (errno) ); |
270 |
fprintf(stderr, "[tdeinit] Couldn't dup2() %s: %s\n", tty, strerror (errno) ); |
| 271 |
close( fd ); |
271 |
close( fd ); |
| 272 |
return; |
272 |
return; |
| 273 |
} |
273 |
} |
|
Lines 690-696
Link Here
|
| 690 |
if (d.result == 2) |
690 |
if (d.result == 2) |
| 691 |
{ |
691 |
{ |
| 692 |
#ifndef NDEBUG |
692 |
#ifndef NDEBUG |
| 693 |
fprintf(stderr, "[tdeinit] %s is executable. Launching with exec.\n", _name ); |
693 |
fprintf(stderr, "[tdeinit] %s is executable. Launching.\n", _name ); |
| 694 |
#endif |
694 |
#endif |
| 695 |
exec = true; |
695 |
exec = true; |
| 696 |
continue; |
696 |
continue; |
|
Lines 1350-1358
Link Here
|
| 1350 |
exit_pid = waitpid(-1, 0, WNOHANG); |
1350 |
exit_pid = waitpid(-1, 0, WNOHANG); |
| 1351 |
if (exit_pid > 0) |
1351 |
if (exit_pid > 0) |
| 1352 |
{ |
1352 |
{ |
| 1353 |
#ifndef NDEBUG |
1353 |
// #ifndef NDEBUG |
| 1354 |
fprintf(stderr, "[tdeinit] PID %ld terminated.\n", (long) exit_pid); |
1354 |
// fprintf(stderr, "[tdeinit] PID %ld terminated.\n", (long) exit_pid); |
| 1355 |
#endif |
1355 |
// #endif |
| 1356 |
if (waitForPid && (exit_pid == waitForPid)) |
1356 |
if (waitForPid && (exit_pid == waitForPid)) |
| 1357 |
return; |
1357 |
return; |
| 1358 |
|
1358 |
|
|
Lines 1505-1511
Link Here
|
| 1505 |
if (lt_dlinit()) |
1505 |
if (lt_dlinit()) |
| 1506 |
{ |
1506 |
{ |
| 1507 |
const char * ltdlError = lt_dlerror(); |
1507 |
const char * ltdlError = lt_dlerror(); |
| 1508 |
fprintf(stderr, "can't initialize dynamic loading: %s\n", ltdlError != 0 ? ltdlError : "(null)" ); |
1508 |
fprintf(stderr, "[tdeinit] Can't initialize dynamic loading: %s\n", ltdlError != 0 ? ltdlError : "(null)" ); |
| 1509 |
} |
1509 |
} |
| 1510 |
if (!extra_path.isEmpty()) |
1510 |
if (!extra_path.isEmpty()) |
| 1511 |
lt_dlsetsearchpath(extra_path.data()); |
1511 |
lt_dlsetsearchpath(extra_path.data()); |
|
Lines 1630-1636
Link Here
|
| 1630 |
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)), |
1630 |
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)), |
| 1631 |
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)) ); |
1631 |
BlackPixelOfScreen(DefaultScreenOfDisplay(X11display)) ); |
| 1632 |
#ifndef NDEBUG |
1632 |
#ifndef NDEBUG |
| 1633 |
fprintf(stderr, "[tdeinit] opened connection to %s\n", DisplayString(X11display)); |
1633 |
fprintf(stderr, "[tdeinit] Opened connection to %s\n", DisplayString(X11display)); |
| 1634 |
#endif |
1634 |
#endif |
| 1635 |
int fd = XConnectionNumber( X11display ); |
1635 |
int fd = XConnectionNumber( X11display ); |
| 1636 |
int on = 1; |
1636 |
int on = 1; |
|
Lines 1896-1902
Link Here
|
| 1896 |
} |
1896 |
} |
| 1897 |
free (safe_argv); |
1897 |
free (safe_argv); |
| 1898 |
|
1898 |
|
| 1899 |
tdeinit_setproctitle("tdeinit Running..."); |
1899 |
tdeinit_setproctitle("[tdeinit] tdeinit Running..."); |
| 1900 |
|
1900 |
|
| 1901 |
if (!keep_running) |
1901 |
if (!keep_running) |
| 1902 |
return 0; |
1902 |
return 0; |