scons icon indicating copy to clipboard operation
scons copied to clipboard

Ability to stop builds without corrupting db

Open bdbaddog opened this issue 8 years ago • 4 comments

This issue was originally created at: 2008-07-18 18:02:05. This issue was reported by: aligorith.

aligorith said at 2008-07-18 18:02:05

Currently, if trying to cancel a build using the Ctrl-C command in the console on Windows, the scons db (or whatever the mechanism is) could get corrupted and force a full recompile the next time a compilation is done. This is a huge problem if trying to compile a large project on a slow computer.

It would be nice if there was some in-built mechanism to stop a build, without having to resort to using Ctrl-C to kill the process and potentially having to rebuild everthing from scratch. Dunno whether this is possible at all through python

azverkan said at 2008-07-21 19:41:20

This issue is rooted in the differences between Unix and Windows signal handling. There are two types of events on Windows Ctrl-C and Ctrl-Break events which are handled differently for children of processes attached to the console. Some research is needed on how best to address this issue. It might be interesting to see how Cygwin handles this case.

gregnoel said at 2008-07-22 00:17:32

Bug party triage. Brandon to add a comment describing the underlying problem in more detail, and what it might take to solve it.

belley said at 2008-07-22 05:56:05

I noticed that the bug was posted against 0.96.1. There was a significant rework of the handling of the keyboard interrupt signal in 0.98.X. It might be worthwhile to check if the issue is solved in 0.98.5. Note that we do use 0.98.5 on Windows and we are able to interrupt our builds without corrupting the scons db.

Benoit

azverkan said at 2009-03-02 09:26:31

The bug as stated does not seem to be reproducible anymore, but I am able to reproduce a similar bug with roughly the same side effects on both Windows and Linux.

Instead of the .sconsign.dblite being corrupted, if you get lucky, you can get SCons to interrupt where there is only a .sconsign.tmp file and no .sconsign.dblite file on the disk. The next run of SCons will then blast the .sconsign.tmp file and you are then left with an empty .sconsign.dblite file.

bdbaddog avatar Jan 02 '18 12:01 bdbaddog