Git Product home page Git Product logo

cse506's Introduction

cse506's People

Contributors

emaadmanzoor avatar racheesingh avatar

Watchers

 avatar  avatar  avatar

Forkers

racheesingh

cse506's Issues

W1P1: Shell

See project hints.

Tasks:

Each task will occur as a separate branch and then be merged in. Branch names are at the start of each task item.

  • barebones: Set up Makefile, barebones binary executor (as seen in class) and update README. (Rachee)
  • command: Full-fledged command execution. (Rachee)
  • changedir: Implement cd functionality. (Emaad)
  • script: Script execution. (Rachee)
  • env: Enable setting $PATH and $PS1. (Emaad)
  • path: Use $PATH to search for executables. (Emaad)
  • ps1: Use $PS1 to set prompt. (Emaad)
  • bg: Enable background execution with &. (Rachee)
  • Submit!

Optional functionality:

  • list: Enable a list of commands separated by ;. (Emaad)
  • piperedir: Implement pipes and redirection.
  • debug: Add a way to print debug output if #define DEBUG 1 is present. (Emaad)

Timeline:

  • Sep 5, Sat: barebones
  • Sep 6, Sun: command, changedir, env
  • Sep 7, Mon: script, bg

Resources:

Valgrind memleak when entering a wrong command

sbush>random
Command: random
ARGS 0: random
Exec failed! Returned status -1
==23195==
==23195== HEAP SUMMARY:
==23195==     in use at exit: 44,182 bytes in 450 blocks
==23195==   total heap usage: 547 allocs, 97 frees, 50,482 bytes allocated
==23195==
==23195== LEAK SUMMARY:
==23195==    definitely lost: 152 bytes in 6 blocks
==23195==    indirectly lost: 71 bytes in 13 blocks
==23195==      possibly lost: 0 bytes in 0 blocks
==23195==    still reachable: 4,127 bytes in 4 blocks
==23195==         suppressed: 39,832 bytes in 427 blocks
==23195== Rerun with --leak-check=full to see details of leaked memory
==23195==
==23195== For counts of detected and suppressed errors, rerun with: -v
==23195== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Valgrind error in setenv

sbush>setenv PATH /usr/bin
Command: setenv
ARGS 0: setenv
ARGS 1: PATH
ARGS 2: /usr/bin
==23180== Invalid write of size 1
==23180==    at 0x100001CC5: strcpy (strcpy.c:4)
==23180==    by 0x100001BF5: setenv (setenv.c:19)
==23180==    by 0x100001918: main (sbush.c:157)
==23180==  Address 0x10081fde8 is 0 bytes after a block of size 8 alloc'd
==23180==    at 0x10000945B: malloc (in /usr/local/Cellar/valgrind/HEAD/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==23180==    by 0x100001BE6: setenv (setenv.c:18)
==23180==    by 0x100001918: main (sbush.c:157)

W1P2: stdlib

See project hints.

Tasks:

Signals: Emaad/Rachee

  • signal
  • kill
  • alarm
  • sleep - have to come up with a notion of time. Have added a sleep.c.

Directories: Rachee/Emaad

  • opendir
  • closedir
  • readdir

For sbush:

  • gets Rachee

Memory: Emaad

  • malloc
  • free
  • brk

Processes: Rachee

  • fork
  • getpid
  • getppid
  • execve
  • waitpid

Paths: Emaad

  • getcwd
  • chdir

Files: Rachee

  • open
  • read
  • write
  • lseek
  • close
  • dup
  • dup2

Optional functionality:

TODO

Timeline:

TODO

Resources:

Valgrind memleak with "/usr/bin/ include obj"

sbush>/usr/bin/ include obj
Bad command or filename: -1
==23448==
==23448== HEAP SUMMARY:
==23448==     in use at exit: 44,063 bytes in 440 blocks
==23448==   total heap usage: 535 allocs, 95 frees, 50,410 bytes allocated
==23448==
==23448== LEAK SUMMARY:
==23448==    definitely lost: 72 bytes in 3 blocks
==23448==    indirectly lost: 40 bytes in 6 blocks
==23448==      possibly lost: 0 bytes in 0 blocks
==23448==    still reachable: 4,159 bytes in 6 blocks
==23448==         suppressed: 39,792 bytes in 425 blocks
==23448== Rerun with --leak-check=full to see details of leaked memory
==23448==
==23448== For counts of detected and suppressed errors, rerun with: -v
==23448== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.