Syborg icon indicating copy to clipboard operation
Syborg copied to clipboard

Unable to write data to file with -w option or to log file

Open MilindPurswani opened this issue 5 years ago • 4 comments

It seems that whenever a file is not closed properly and the script is terminated with with ctrl+z, the script gets killed but python still runs in the background. The file variables are not destroyed thereby new scripts cannot access old files generated for logging and writing data.

MilindPurswani avatar Oct 03 '19 20:10 MilindPurswani

I suggest for now the best way to ensure that required files are generated, we can simply execute

killall python3

This is a temporary fix and a permanant fix will be deployed soon.

MilindPurswani avatar Oct 03 '19 20:10 MilindPurswani

This was caused due to a commit that was made last night covering up the overhead of opening and closing the file https://github.com/MilindPurswani/Syborg/commit/e7b323a6f02a2aa27beb867fd7c48b8c2541dadc.

MilindPurswani avatar Oct 04 '19 13:10 MilindPurswani

You can try https://stackoverflow.com/a/1112350

yashrs avatar Oct 04 '19 13:10 yashrs

As always, that's a good observation @yashrs. We should let the script run its course and focus on capturing such events. However, I am not sure if the same is applicable to ctrl + z

Thanks,

-Milind

MilindPurswani avatar Oct 04 '19 13:10 MilindPurswani