mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
* AutoSaveBuffer::generateChild(): return early.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22546 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2c1b8bc472
commit
c81f5add99
@ -2271,12 +2271,13 @@ int AutoSaveBuffer::generateChild()
|
||||
pid_t const pid = fork();
|
||||
// If you want to debug the autosave
|
||||
// you should set pid to -1, and comment out the fork.
|
||||
if (pid == 0 || pid == -1) {
|
||||
if (pid != 0 && pid != -1)
|
||||
return pid;
|
||||
|
||||
// pid = -1 signifies that lyx was unable
|
||||
// to fork. But we will do the save
|
||||
// anyway.
|
||||
bool failed = false;
|
||||
|
||||
FileName const tmp_ret = FileName::tempName("lyxauto");
|
||||
if (!tmp_ret.empty()) {
|
||||
buffer_.writeFile(tmp_ret);
|
||||
@ -2295,9 +2296,10 @@ int AutoSaveBuffer::generateChild()
|
||||
buffer_.message(_("Autosave failed!"));
|
||||
}
|
||||
}
|
||||
|
||||
if (pid == 0) // we are the child so...
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
return pid;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user