diff options
author | Xiao Pan <xyz@flylightning.xyz> | 2025-05-07 20:21:50 -0700 |
---|---|---|
committer | Xiao Pan <xyz@flylightning.xyz> | 2025-05-07 20:21:50 -0700 |
commit | a936ca5d68aa04a906796399958a55cb1f65bc84 (patch) | |
tree | 13a019996aae0bd0b79349dd96891c75b83fff42 | |
parent | 44fc375416ea3690416f17cb5f1433c08e939cb3 (diff) |
fix: need fflush for systemd to log my stdout
-rw-r--r-- | mycan.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -112,6 +112,10 @@ int main(int argc, char **argv) else break; } + // need fflush for systemd to log my stdout + // https://unix.stackexchange.com/questions/725331 + // https://unix.stackexchange.com/questions/785686 + fflush(stdout); //1.Create socket s = socket(PF_CAN, SOCK_RAW, CAN_RAW); |