Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!news.funet.fi!hydra!cc.helsinki.fi!torvalds From: torvalds@cc.helsinki.fi Newsgroups: comp.os.minix Subject: Re: PS and Minix-386. Message-ID: <1991Apr1.123039.5786@cc.helsinki.fi> Date: 1 Apr 91 12:30:39 GMT References: <7210@munnari.oz.au> Organization: University of Helsinki Lines: 46 In article , kemp@convex.com (Phil Kemp) writes: > In <7210@munnari.oz.au> bevan@ecr.mu.oz.au (Bevan Anderson) writes: > >>I recompiled ps.c with bcc -3 so to give me a 32 bit >>binary. Now when I execute ps (as root) I get: > >>memory fault: core dumped. > >>This happens after ps puts up the top line of the output (TTY LINE etc) >>I am doing a ps -U but that gets the same problem. > > I too have had similar problems with the various versions of ps with > the 386 Minix kernel. Maybe someone could post a version of ps.c which > does in fact work with Bruce's 386 Minix... > > I know I would sure appreciate it. > > Thanks. > PK > -- > Phil Kemp > CONVEX Computer of Canada Ltd. > Voice:(403)-233-2815 > UUCP:kemp@convex.com RTFSC (Read the F**ing Source Code :-) - It is heavily commented and the solution should be obvious (take that with a grain of salt, it certainly stumped me for a while :-). Simply change the 4 define-lines at the start (well, I'd guess about line 40) that read #define kernel "/usr/src/kernel/kernel" #define mm "/usr/src/mm/mm" #define fs "/usr/src/fs/fs" #define init "/usr/src/tools/init" to where-ever you have them now (/etc/system/kernel,fs,init,mm if you did as the tutor that is floating around said) NOTE! I wrote this from memory - this is certainly not exactly how the defines look (and I'm not certain that there is a define for init, I think it never gets used). It should be no problem finding them though - there should be nothing like it elsewhere in ps.c. It is inside a #if by the way. Cdiffs might be a good idea, but I don't have access to my minix-box right now. Doing them manually wasn't any problem. Linus Torvalds torvalds@cc.helsinki.fi