diff --git a/fail b/fail new file mode 100755 index 0000000..1f8ed41 Binary files /dev/null and b/fail differ diff --git a/fail.c b/fail.c new file mode 100644 index 0000000..0630179 --- /dev/null +++ b/fail.c @@ -0,0 +1,10 @@ +#include + +/* + * This program has the purpose of returning a -1 value, indicating the shell that something has gone wrong + * while the program was running. + */ + +int main(){ + return -1; +} diff --git a/return-specified b/return-specified new file mode 100755 index 0000000..406b9d4 Binary files /dev/null and b/return-specified differ diff --git a/return-specified.c b/return-specified.c new file mode 100644 index 0000000..7477ffa --- /dev/null +++ b/return-specified.c @@ -0,0 +1,15 @@ +#include +#include + +/* + * This program takes the given argument and returns it as an integer. + * It might be useful to test a shell. + */ + +int main(int argc, char** argv){ + if(argc<2){ + printf("No argument given.\n"); + return -1; + } + return atoi(argv[1]); +} diff --git a/success b/success new file mode 100755 index 0000000..4fc9eb4 Binary files /dev/null and b/success differ diff --git a/success.c b/success.c new file mode 100644 index 0000000..4278030 --- /dev/null +++ b/success.c @@ -0,0 +1,10 @@ +#include + +/* + * This program has the purpose of returning a 0 value, indicating to the shell that the program was + * executed successfully. + */ + +int main(){ + return 0; +}