Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xxs
on Aug 21, 2014
|
parent
|
context
|
favorite
| on:
fork() can fail
The OP said: wrap in a macro having similar properties (ala pseudo code).
jacquesm
on Aug 21, 2014
[–]
Good luck writing a macro in C to express language functionality for which you don't have the primitives. It's not exactly lisp. Think of C macros as a way to save you some typing and lisp macros as a way to extend the language.
tedunangst
on Aug 21, 2014
|
parent
|
next
[–]
setjmp and longjmp are sufficient building blocks for this.
xxs
on Aug 21, 2014
|
parent
|
prev
[–]
you can definitely save the chdir and restore it macro.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: