aboutsummaryrefslogtreecommitdiffstats
path: root/swaylock
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-03-10 23:41:24 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-03-10 23:41:24 -0500
commit9aed9d93596cdc72e305338d82ccc0dcaf85c6e2 (patch)
treeb5a3db4994970b2d0033e717771b24a92503ddac /swaylock
parentFurther indentation corrections (diff)
downloadsway-9aed9d93596cdc72e305338d82ccc0dcaf85c6e2.tar.gz
sway-9aed9d93596cdc72e305338d82ccc0dcaf85c6e2.tar.zst
sway-9aed9d93596cdc72e305338d82ccc0dcaf85c6e2.zip
UnGNUify the codebase
Diffstat (limited to 'swaylock')
-rw-r--r--swaylock/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index 49b24a3a..9b33aab9 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -1,3 +1,4 @@
1#define _XOPEN_SOURCE 500
1#include "wayland-swaylock-client-protocol.h" 2#include "wayland-swaylock-client-protocol.h"
2#include <xkbcommon/xkbcommon.h> 3#include <xkbcommon/xkbcommon.h>
3#include <xkbcommon/xkbcommon-names.h> 4#include <xkbcommon/xkbcommon-names.h>
@@ -460,12 +461,16 @@ int main(int argc, char **argv) {
460 case 'u': 461 case 'u':
461 show_indicator = false; 462 show_indicator = false;
462 break; 463 break;
463 case 'f': 464 case 'f': {
464 if (daemon(0, 0) != 0) { 465 pid_t t = fork();
466 if (t == -1) {
465 sway_log(L_ERROR, "daemon call failed"); 467 sway_log(L_ERROR, "daemon call failed");
466 exit(EXIT_FAILURE); 468 exit(EXIT_FAILURE);
469 } else if (t > 0) {
470 exit(0);
467 } 471 }
468 break; 472 break;
473 }
469 case 'r': 474 case 'r':
470 if (line_source != LINE_SOURCE_DEFAULT) { 475 if (line_source != LINE_SOURCE_DEFAULT) {
471 sway_log(L_ERROR, "line source options conflict"); 476 sway_log(L_ERROR, "line source options conflict");