Skip to content

Instantly share code, notes, and snippets.

@jvns
Last active August 29, 2015 14:06
exercise_solutions.md

Exercise 1

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>

#include "utils.h"

int main(int argc, char **argv) {
  while(1) {
    printf("yay shell> ");
    char *line = NULL;
    size_t capacity = 0;
    getline(&line, &capacity, stdin);
    printf("%s", line);
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment