Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.programmer Subject: Re: Troubles opening the same file on 2 nodes Keywords: open, Text file buzy Message-ID: <1991Mar25.113854.6560@athena.mit.edu> Date: 25 Mar 91 11:38:54 GMT References: <1991Mar24.191011.14552@IRO.UMontreal.CA> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 42 In article <1991Mar24.191011.14552@IRO.UMontreal.CA>, u715@JSP.UMontreal.CA (Beliveau Steeve) writes: |> Hi! |> Here's a little program that will well explain my problem : No, actually, it doesn't explain it very well at all, at least not as far as I can tell. |> #include |> |> main() |> { |> int fd; |> |> if (open("test", O_RDWR, 0777) == -1) |> perror("THE error:"); |> for(;;); |> } What is the "test" file you're trying to open? Is it a text file, or is it the binary you have compiled from the source code above? Or something else? Is the file on the local hard disk, or is it on a network file system disk? If so, what kind of network file system? NFS? AFS? Something else? |> And the error is: Text file busy. |> |> If I execute this program on the same node, on two different shell there is no errors. |> |> So what is the difference between excuting on the same or on two nodes? If you're talking about a network file system, then is the file local on either of the machines you're running it on, or is it on a third-party fileserver? And I'm assuming that when you say "node," you mean machine on the network. Is that correct? -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710