Path: utzoo!attcan!uunet!husc6!cmcl2!rutgers!gatech!mcdchg!ddsw1!karl From: karl@ddsw1.MCS.COM (Karl Denninger) Newsgroups: comp.databases Subject: Re: FoxBase Summary: You can run in background; it takes some trickery Message-ID: <2755@ddsw1.MCS.COM> Date: 22 Jan 89 06:51:11 GMT References: <5187@lynx.UUCP> <477@telly.UUCP> Reply-To: karl@ddsw1.UUCP (Karl Denninger) Distribution: na Organization: Macro Computer Solutions, Inc., Mundelein, IL Lines: 59 In article <477@telly.UUCP> evan@telly.UUCP (Evan Leibovitch) writes: >In article <5187@lynx.UUCP> vik@lynx.UUCP (Vikram Sohal) writes: >> >>Anybody out there know how the FoxBase multi-user database for Microport >>system V compares to the likes of Informix and Oracle? > >Watch out. The ONLY multi-user versions of FoxBase+ I know of are available >for the NCR Tower and SCO Xenix ONLY. ..... >One BIG disadvantage of FoxBase I have come across is that I haven't yet been >able to get it to run backround tasks (ie, overnight report generation using >cron). It appears to die quickly unless it has control of your screen - my >guess, they're probably too dependent on curses and haven't provided for >programs which can run without screen display. Right.... Now consider this little program (incomplete, but so small I just had to post it): main(argc, argv) int argc; char *argv[]; { for (x = 0; x < NFILE; x++) close(x); /* Close control term */ setpgrp(); /* You're on your own baby! */ (void) fopen("/dev/tty12", "r"); /* Establish a "control" */ (void) fopen("/dev/tty12", "w"); (void) fopen("/dev/tty12", "w"); /* Pick a terminal :-) */ putenv("TERM=ansi"); /* Make sure type is set */ /* Now exec the real program */ execlp("foxplus", "foxplus", argv[1], (char *) NULL); puts("Oops; can't run foxbase"); /* We blew it; not located */ perror("foxbase"); /* (probably not in path */ exit(-1); } I think with a little work that fragment might do what you want (given an inactive line on tty12, the last virtual console. Make sure you have all 12 established in your system configuration). The trick (of course) is to change your control terminal to be a unused (make sure it's not enabled!) virtual console, and then insure that it's a type FOXBASE+ will deal with.... Execute that fragment from cron with an argument of the .prg file you need executed.... ought to do the job quite well. If you're going to use this for general consumption you will also want to do some checking for reasonable conditions (ie: set a lockfile or somesuch if your system barfs on two people opening a line at once in this fashion). --- Karl Denninger (karl@ddsw1.MCS.COM, ddsw1!karl) Data: [+1 312 566-8912], Voice: [+1 312 566-8910] Macro Computer Solutions, Inc. "Quality solutions at a fair price"