Frage

Problem is - I have to implement my own exit(status) with setjmp and longjmp. Maybe someone could give some pointers?

War es hilfreich?

Lösung

The only solution I think of right now, is to call setjmp early in main, and then create a MyExit function which does a longjmp to the setjmp in main and does a return with some value (provided from the longjmp call).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top