Differences

This shows you the differences between two versions of the page.

Link to this comparison view

so:laboratoare:resurse:die [2018/02/26 08:57]
mbarbulescu [Concluzie]
so:laboratoare:resurse:die [2018/03/02 23:36] (current)
mihai.popescu1212 [Macro-ul DIE]
Line 14: Line 14:
  
 <code c> <code c>
 +#include <​errno.h>​
 #define DIE(assertion,​ call_description) \ #define DIE(assertion,​ call_description) \
  do { \  do { \
Line 20: Line 21:
  __FILE__,​ __LINE__);​ \  __FILE__,​ __LINE__);​ \
  perror(call_description);​ \  perror(call_description);​ \
- exit(EXIT_FAILURE); \+ exit(errno); \
  } \  } \
  } while (0)  } while (0)
so/laboratoare/resurse/die.txt · Last modified: 2018/03/02 23:36 by mihai.popescu1212
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0