source: trunk/tools/neercs/old/mini-neercs.c @ 1642

Last change on this file since 1642 was 1642, checked in by sam, 7 years ago

neercs: import files from the (unfinished) old neercs code.

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1/*
2 *  neercs        console-based window manager
3 *  Copyright (c) 2006-2010 Sam Hocevar <sam@hocevar.net>
4 *                2008-2010 Jean-Yves Lamoureux <jylam@lnxscene.org>
5 *                2008-2010 Pascal Terjan <pterjan@linuxfr.org>
6 *                All Rights Reserved
7 *
8 *  This program is free software. It comes without any warranty, to
9 *  the extent permitted by applicable law. You can redistribute it
10 *  and/or modify it under the terms of the Do What The Fuck You Want
11 *  To Public License, Version 2, as published by Sam Hocevar. See
12 *  http://sam.zoy.org/wtfpl/COPYING for more details.
13 */
14
15#if defined HAVE_CONFIG_H
16#   include "config.h"
17#endif
18
19#include <stdlib.h>
20#include <stdio.h> /* perror() */
21#include <unistd.h> /* fork() */
22
23#include "mini-neercs.h"
24
25int main(void)
26{
27    pid_t pid;
28
29    pid = fork();
30
31    if (pid < 0)
32    {
33        perror("fork");
34        return EXIT_FAILURE;
35    }
36
37    if (pid > 0)
38    {
39        client_init();
40        while(client_step()) ;
41        client_fini();
42    }
43    else
44    {
45        server_init();
46        while(server_step()) ;
47        server_fini();
48    }
49
50    return EXIT_SUCCESS;
51}
52
Note: See TracBrowser for help on using the repository browser.