use "-b" option when spawning new xschem windows, instead of redirecting i/o to /dev/null

This commit is contained in:
Stefan Frederik 2021-05-21 10:36:50 +02:00
parent 6c8b38ecf0
commit 6929cc896e
2 changed files with 15 additions and 18 deletions

View File

@ -146,16 +146,18 @@ int try_icl_(int logdepth, const char *prefix, const char *test_c_in, const char
}
/* load uincludes, uclfags, uldflags and uprefix - LOAD() inserts the u */
l = sprintf(apath, "/arg/icl/%s/", prefix); apath_end = apath+l;
LOAD(includes);
LOAD(cflags);
LOAD(ldflags);
LOAD(prefix);
l = sprintf(apath, "/arg/icl/%s/%s/", db_cwd, prefix); apath_end = apath+l;
LOAD(includes);
LOAD(cflags);
LOAD(ldflags);
LOAD(prefix);
if (prefix != NULL) { /* prefix == NULL means non-standard icl; caller sets non-standard nodes, the user can't affect that */
l = sprintf(apath, "/arg/icl/%s/", prefix); apath_end = apath+l;
LOAD(includes);
LOAD(cflags);
LOAD(ldflags);
LOAD(prefix);
l = sprintf(apath, "/arg/icl/%s/%s/", db_cwd, prefix); apath_end = apath+l;
LOAD(includes);
LOAD(cflags);
LOAD(ldflags);
LOAD(prefix);
}
/* special case: all three specified by the user - ignore what the detector wanted, but run only once per node prefix */
if ((uincludes != NULL) && (ucflags != NULL) && (uldflags != NULL)) {

View File

@ -272,21 +272,16 @@ void new_window(const char *cell, int symbol)
exit(0); /* --> child of child will be reparented to init */
} else if (!pid2) {
/* child of child */
if(!(freopen("/dev/null","w",stdout) && freopen("/dev/null","r",stdin) &&
freopen("/dev/null","w",stderr))){
fprintf(errfp, "new_window(): freopen error\n");
tcleval("exit");
}
if(!cell || !cell[0]) {
execl(xschem_executable,xschem_executable,"-r", NULL);
execl(xschem_executable,xschem_executable,"-b", NULL);
}
else if(!symbol) {
my_strncpy(f, cell, S(f));
execl(xschem_executable,xschem_executable,"-r",f, NULL);
execl(xschem_executable,xschem_executable,"-b",f, NULL);
}
else {
my_strncpy(f, cell, S(f));
execl(xschem_executable,xschem_executable,"-r",f, NULL);
execl(xschem_executable,xschem_executable,"-b",f, NULL);
}
} else {
/* error */