Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!shukra!ram From: ram%shukra@Sun.COM (Renu Raman, Sun Microsystems) Newsgroups: comp.unix.wizards Subject: Re: To find out the names of open files in a process Message-ID: <39192@sun.uucp> Date: 18 Jan 88 20:11:28 GMT References: <2346@mandrill.CWRU.Edu> Sender: news@sun.uucp Lines: 37 Summary: Process suspension and resumption In article <2346@mandrill.CWRU.Edu>, garg@mandrill.CWRU.Edu (Dev Datt Garg) writes: > > Hi Friends, > I am working on my M.S. Thesis. I am extending the command language of > GDB(Gnu Debugger) for Sun3 running BSD unix. One of the features I am trying > to add is to be able to save the context of a process at any point in the > user program, so that at later stage program can be restarted from that point. > I have got some success in doing that. I am having a problem, If the program, > which I am debugging has some files open. I am unable to know which files were > open, so that the status of those files can be restored. > > Of course one of the things I am saving is a user structure, which > contains most of the info regarding process context. I somehow want to > recover the names of the open files from this struct or from anywhere else. > I will highly appreciate if some Guru could tell me some way of achieving > that. > Thanx in advance. > > usenet: {decvax,cbosgd,sun}!mandrill!garg Dev Datt Garg > csnet: garg@mandrill.CWRU.edu > arpa: garg@mandrill.CWRU.edu Read the report "An unix 4.2 BSD implementation of Process suspension and resumption" by A.Y. Chen (Jun 86 , U. of Ill, report no. UiUCDCS-R-86-1286 ). At the end of the report is included the source code which includes some diffs to the kernel - user structure, kern_descrip.c, kern_exec.c, ufs_nami.c. I guess the objective there was to checkpoint a process and save the process state in a stable storage and restore it when needed. An implementation was done on SYS V too. Just send mail to Erna Amerman (erna@a.cs.uiuc.edu) and ask for report DCS-R-86-1286. --------------------- Renukanthan Raman ARPA:ram@sun.com Sun Microsystems UUCP:{ucbvax,seismo,hplabs}!sun!ram M/S 5-40, 2500 Garcia Avenue, Mt. View, CA 94043