Elektrine lite

← Feed

@jschauma@mstdn.social

2026-09-16 20:49 UTC

Advanced Programming in the #UNIX Environment Week 2: File Descriptors To introduce the concept of file descriptors, let's start with a simple question: how many file descriptors can a unix process open? Finding the answer helps us introduce a few different limits that may apply across the system, for a given user, or just a process. As a fun exercise, try setting "ulimit -n 0" in your shell and see what happens. Can you explain why? https://youtu.be/h5A1OQjuCqk

Replies (1)

  • @jschauma@mstdn.social 2026-09-18 12:36

    Advanced Programming in the #UNIX Environment Week 2: open(2) and close(2) Having introduced the concept of file descriptors, let's look at what happens when we try to create a file, "create" an existing file, open an existing file, truncate a file, and look at the various other flags we can pass to open(2). We also note the perhaps surprising number of ways in which open(2) can fail and take a look at openat(2) and TOCTOU defenses. https://youtu.be/QnL4eYpb5Iw

    Open ##4801200