Skip to content
Snippets Groups Projects
Commit 6193e760 authored by Jaewon Choi's avatar Jaewon Choi
Browse files

Fix signal implementation issue

parent f6a23eb1
No related branches found
No related tags found
No related merge requests found
# For implementation
CC=gcc -std=c99
CFLAGS=-I./src -I./include
LIB=
OBJ=./src/utils.o ./src/commands.o ./src/built_in.o
LIB=-lpthread
OBJ=./src/utils.o ./src/commands.o ./src/built_in.o ./src/signal.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
mysh: $(OBJ)
$(CC) -o $@ $^ ./src/main.c $(CFLAGS)
$(CC) -o $@ $^ ./src/main.c $(CFLAGS) $(LIB)
# For testing
CXX=g++ -std=c++11
......@@ -18,7 +18,7 @@ TESTING_SRC=./tests/src/command_parsing_test.cc ./tests/src/command_validate_tes
TESTING_EXE=mysh-test
test: $(OBJ)
$(CXX) $(TESTING_FLAGS) -o $(TESTING_EXE) $(TESTING_SRC) $(OBJ) $(TESTING_LIB)
$(CXX) $(TESTING_FLAGS) -o $(TESTING_EXE) $(TESTING_SRC) $(OBJ) $(TESTING_LIB) $(LIB)
./$(TESTING_EXE)
clean:
......
#ifndef SIGNAL_H_
#define SIGNAL_H_
void catch_sigint(int);
void catch_sigint(int signalNo);
void catch_sigtstp(int);
void catch_sigtstp(int signalNo);
#endif // SIGNAL_H_
#include "signal.h"
void catch_sigint(int)
void catch_sigint(int signalNo)
{
// TODO: File this!
}
void catch_sigtstp(int);
void catch_sigtstp(int signalNo)
{
// TODO: File this!
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment