Reputation: 73
Is it possible to set the exit status when terminating a Chapel program? I can always use:
extern "exit" proc c_exit(status:c_int);
The following does the trick.
extern "exit" proc c_exit(status:c_int);
module M {
proc main() {
writeln("hello, world");
c_exit(1);
}
}
This sets the exit status to 1 - just wondering if there's a way that doesn't require a call into the C library.
Upvotes: 4
Views: 70