These bits are generally reserved for process-specific behavior.
Explicitly return 0 for success and 1 for failure.
The firewall program already does this.
The return codes from the main functions of each project will continue to utilize all of the bits as designed.
This will allow for projects that link to the library to get the actual return codes while simultaneously being compatible with Linux and Bash.
Later versions may provide alternative ways to get the error code from within the shell.
For example, if a specific return code environment variable is set, then the program could populate that environment variable on exit (clearing it on start).
data.process_pipe = f_true;
}
- return fss_basic_list_read_main(argc, argv, &data);
+ if (f_error_is_error(fss_basic_list_read_main(argc, argv, &data))) {
+ return 1;
+ }
+
+ return 0;
}
data.process_pipe = f_true;
}
- return fss_basic_list_write_main(argc, argv, &data);
+ if (f_error_is_error(fss_basic_list_write_main(argc, argv, &data))) {
+ return 1;
+ }
+
+ return 0;
}
data.process_pipe = f_true;
}
- return fss_basic_read_main(argc, argv, &data);
+ if (f_error_is_error(fss_basic_read_main(argc, argv, &data))) {
+ return 1;
+ }
+
+ return 0;
}
data.process_pipe = f_true;
}
- return fss_basic_write_main(argc, argv, &data);
+ if (f_error_is_error(fss_basic_write_main(argc, argv, &data))) {
+ return 1;
+ }
+
+ return 0;
}
data.process_pipe = f_true;
}
- return fss_extended_read_main(argc, argv, &data);
+ if (f_error_is_error(fss_extended_read_main(argc, argv, &data))) {
+ return 1;
+ }
+
+ return 0;
}
data.process_pipe = f_true;
}
- return fss_extended_write_main(argc, argv, &data);
+ if (f_error_is_error(fss_extended_write_main(argc, argv, &data))) {
+ return 1;
+ }
+
+ return 0;
}
data.process_pipe = f_true;
}
- return fss_return_code_main(argc, argv, &data);
+ if (f_error_is_error(fss_return_code_main(argc, argv, &data))) {
+ return 1;
+ }
+
+ return 0;
}
data.process_pipe = f_true;
}
- return return_code_main(argc, argv, &data);
+ if (f_error_is_error(return_code_main(argc, argv, &data))) {
+ return 1;
+ }
+
+ return 0;
}