summaryrefslogtreecommitdiff
path: root/main.c
blob: efc8c8ec5edd2549543012bf311777dc7cf3ff21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <readline/readline.h>
#include <dirent.h>
#include <unistd.h>

/* BOOLEANS */
#define true 1
#define false 0

/* SIGNALS */
#define SIGHUP  1   /* Hang up the process */ 
#define SIGINT  2   /* Interrupt the process */ 
#define SIGQUIT 3   /* Quit the process */ 
#define SIGILL  4   /* Illegal instruction. */ 
#define SIGTRAP 5   /* Trace trap. */ 
#define SIGABRT 6   /* Abort. */

typedef struct 
{
    int process_id;
} id;



void process_execution(int id)
{
    fork();
}
void REDIRECTION();
void SCRIPTING();

void ERROR_QUIT(char *CURRENT_COMMAND)
{
    printf("failed %s", CURRENT_COMMAND);
    
}

void err_sys(char *string)
{
    printf("%s", string);
}

void PROCESS_PID()
{
    printf("PID %ld\n", (long)getpid());
}

void LIST_CURRENT_DIRECTORY(int argc, char *argv[])
{
    
}

void ECHO_INPUT(char *string)
{
    printf("%s", string);
}

int loop_shell()
{

    
    return 0;
}

int main(int argc, char *argv[]) {


    int i = getpid();
    printf("%d", i);

    return 0;
}