One correction to the previous commit to avoid running
Tk_RestrictEvents() when in batch mode (no graphics, therefore no Tk); otherwise, this causes magic to segfault.
This commit is contained in:
parent
d8046fba2d
commit
06f0ce4259
|
|
@ -731,7 +731,8 @@ CIFGenSubcells(
|
|||
Tk_RestrictProc *oldProc;
|
||||
ClientData oldArg;
|
||||
|
||||
oldProc = Tk_RestrictEvents(RestrictInputProc, (ClientData)NULL, &oldArg);
|
||||
if (SigInterruptOnSigIO != -1) /* Check for batch mode */
|
||||
oldProc = Tk_RestrictEvents(RestrictInputProc, (ClientData)NULL, &oldArg);
|
||||
#endif /* MAGIC_WRAPPER */
|
||||
|
||||
UndoDisable();
|
||||
|
|
@ -884,7 +885,8 @@ CIFGenSubcells(
|
|||
|
||||
#ifdef MAGIC_WRAPPER
|
||||
/* Restore full event access */
|
||||
Tk_RestrictEvents(oldProc, oldArg, &oldArg);
|
||||
if (SigInterruptOnSigIO != -1) /* Check for batch mode */
|
||||
Tk_RestrictEvents(oldProc, oldArg, &oldArg);
|
||||
#endif /* MAGIC_WRAPPER */
|
||||
|
||||
UndoEnable();
|
||||
|
|
|
|||
|
|
@ -189,7 +189,8 @@ extSubtree(parentUse, reg, f)
|
|||
Tk_RestrictProc *oldProc;
|
||||
ClientData oldArg;
|
||||
|
||||
oldProc = Tk_RestrictEvents(RestrictInputProc, (ClientData)NULL, &oldArg);
|
||||
if (SigInterruptOnSigIO != -1) /* Check for batch mode */
|
||||
oldProc = Tk_RestrictEvents(RestrictInputProc, (ClientData)NULL, &oldArg);
|
||||
#endif /* MAGIC_WRAPPER */
|
||||
|
||||
/* Use the display timer to force a 5-second progress check */
|
||||
|
|
@ -385,7 +386,8 @@ done:
|
|||
|
||||
#ifdef MAGIC_WRAPPER
|
||||
/* Restore full event access */
|
||||
Tk_RestrictEvents(oldProc, oldArg, &oldArg);
|
||||
if (SigInterruptOnSigIO != -1) /* Check for batch mode */
|
||||
Tk_RestrictEvents(oldProc, oldArg, &oldArg);
|
||||
#endif /* MAGIC_WRAPPER */
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ static const char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magi
|
|||
#include "utils/hash.h"
|
||||
#include "utils/undo.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/signals.h"
|
||||
#include "database/database.h"
|
||||
#include "windows/windows.h"
|
||||
#include "dbwind/dbwind.h"
|
||||
|
|
@ -2532,7 +2533,8 @@ DefRead(
|
|||
* corrupt the database during DEF reads.
|
||||
*/
|
||||
|
||||
oldProc = Tk_RestrictEvents(RestrictInputProc, (ClientData)NULL, &oldArg);
|
||||
if (SigInterruptOnSigIO != -1) /* Check for batch mode */
|
||||
oldProc = Tk_RestrictEvents(RestrictInputProc, (ClientData)NULL, &oldArg);
|
||||
#endif /* MAGIC_WRAPPER */
|
||||
|
||||
/* Initialize */
|
||||
|
|
@ -2758,7 +2760,8 @@ DefRead(
|
|||
|
||||
#ifdef MAGIC_WRAPPER
|
||||
/* Restore full event access */
|
||||
Tk_RestrictEvents(oldProc, oldArg, &oldArg);
|
||||
if (SigInterruptOnSigIO != -1) /* Check for batch mode */
|
||||
Tk_RestrictEvents(oldProc, oldArg, &oldArg);
|
||||
#endif /* MAGIC_WRAPPER */
|
||||
|
||||
return rootDef;
|
||||
|
|
|
|||
Loading…
Reference in New Issue