*BSD News Article 7312


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!utcsri!torn!ryelect!elf
From: elf@ee.ryerson.ca (luis fernandes)
Subject: Re: mktemp - Bus Error.
Message-ID: <1992Nov2.210351.12723@ee.ryerson.ca>
Sender: news@ee.ryerson.ca
Nntp-Posting-Host: brundel
Organization: Ryerson Polytechnical Institute, Toronto
References: <6607@otc.otca.oz>
Date: Mon, 2 Nov 1992 21:03:51 GMT
Lines: 28

In article <6607@otc.otca.oz> alexk@otc.otca.oz.au (Alex Kowalenko) writes:
>I'm having problems with mktemp failing due to a Bus Error.  Even a simple program like the
>following will fail:
>
>#include<stdio.h>
> 
>main()
>{
>        printf("%s\n",mktemp("XXXX"));
>}
>
>
>Anyone else noticed this yet? Any fixes in mktemp?
>
According to the man:

    mktemp() creates a unique file name,  typically  in  a  tem-
    porary  filesystem, by replacing template with a unique file
    name, and returns the address of template.   The  string  in
    template  should  contain  a file name with six trailing Xs;
    mktemp() replaces the Xs with a letter and the current  pro-
    cess  ID.  The  letter  will be chosen so that the resulting
    name does not duplicate an existing file.

Life goes on...

--
luis fernandes  <elf@ee.ryerson.ca>