From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,8e7a3b3423ff7381 X-Google-Attributes: gidfee84,public From: Joe Mario Subject: Re: Memory fault(coredump) with time() function. Date: 1999/01/20 Message-ID: <36A5F6BF.167E@zk3.dec.com>#1/1 X-Deja-AN: 434842073 Content-Transfer-Encoding: 7bit References: <01be4463$36d2fa80$64a305c4@jasper.somchem.denel.co.za> To: jasperh Content-Type: text/plain; charset=us-ascii Organization: UBPG Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 jasperh wrote: > > I get a Memory fault (coredump) when using the time() function in the > following C code: ... > int current_time; > current_time=time(); > printf("now=%d\n", time()); The time function you are calling expects a parameter. The coredump occurs because you didn't supply one. If you try compiling in either of the ansi modes (-std or -std1), you'll see the compiler give a compile time error about the missing argument. Try "man 3 time". Joe Mario Compaq Digital UNIX