2012-09-13 09:10:10 +04:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <syscall.h>
|
|
|
|
|
|
|
|
volatile int _end_session = 0;
|
|
|
|
|
|
|
|
void sig_int(int sig) {
|
|
|
|
_end_session = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char * argv[]) {
|
|
|
|
/* Starts a graphical session and then spins waiting for a kill (logout) signal */
|
|
|
|
syscall_signal(2, sig_int);
|
|
|
|
|
|
|
|
if (!fork()) {
|
|
|
|
char * args[] = {"/bin/wallpaper", NULL};
|
|
|
|
execve(args[0], args, NULL);
|
|
|
|
}
|
|
|
|
if (!fork()) {
|
|
|
|
char * args[] = {"/bin/panel", NULL};
|
|
|
|
execve(args[0], args, NULL);
|
|
|
|
}
|
|
|
|
if (!fork()) {
|
2012-09-13 10:14:01 +04:00
|
|
|
char * args[] = {"/bin/terminal", NULL};
|
2012-09-13 09:10:10 +04:00
|
|
|
execve(args[0], args, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (!_end_session) {
|
|
|
|
syscall_yield();
|
|
|
|
}
|
|
|
|
}
|