Hello,
For my prototype project I use basic Sublime Build setup. When I hit cmd+B I see no output in ST console for printf(“launched with pid %d\n”, getpid()); When I run it in the terminal everything works as intended.
Although I am new to C programming and maybe missing some aspects of shell/signals etc.
here is my build system:
{
"folders": [ { "path": "." } ],
"build_systems": [
{
"name": "***",
"shell_cmd": "clang -g -O0 -v ${project_path}/src/what_ever -o /tmp/what_ever.out && printf \"\n\" && /tmp/what_ever.out",
}
]
}
here is the part of my code that outputs:
...
...
sigset_t ss;
sigemptyset(&ss);
sigaddset(&ss, SIGINT);
sigaddset(&ss, SIGTERM);
if (pthread_sigmask(SIG_BLOCK, &ss, NULL) == 0) {
printf("launched with pid %d\n", getpid());
int s = 0;
for (;;) {
if (sigwait(&ss, &s) == 0) {
switch (s) {
case SIGINT:
case SIGTERM:
goto __exit;
default:
continue;
...
...
MacOS Catalina, version 10.15.2 (19C57)
Sublime Text, version: 3.2.2 (build 3211)
–
Best regards