I am experimenting with several tutorial "daytime" servers (UDP, TCP.
sync, async) which come with the C++ Boost libraries.
I was surprised to notice that, after the server was running:
(1) I was allowed to remove the executable (not being root at the
time)
(2) The server -much like the Energizer bunny- keeps on working.
Is that a feature that I can count on, or is something with
unpredictable results which should be avoided?
TIA,
-Ramon
Linux
|
|
0
|
|
|
|
Reply
|
ramon (1465)
|
9/11/2009 3:03:03 PM |
|
On September 11, 2009 11:03, in comp.unix.programmer, Ramon F Herrera
(ramon@conexus.net) wrote:
>
> I am experimenting with several tutorial "daytime" servers (UDP, TCP.
> sync, async) which come with the C++ Boost libraries.
>
> I was surprised to notice that, after the server was running:
>
> (1) I was allowed to remove the executable (not being root at the
> time)
If your uid has write-permissions to a directory in which the executable
file is registered, your uid can remove the filename. That's the way file
permissions work in Unix.
Remember that the file name is not the same as the file itself. The filename
within a directory is simply a pointer to the file. While you may be able
to remove the filename, the file itself
a) may have other filenames in other directories, and
b) won't go away until you delete *all* the filenames referring to it /and/
close all filehandles currently accessing the file
> (2) The server -much like the Energizer bunny- keeps on working.
Yes, why should it not?
> Is that a feature that I can count on, or is something with
> unpredictable results which should be avoided?
It's how the system works. It is defined by both the Posix/SUS
standards, /and/ the Linux standards to work this way.
--
Lew Pitcher
Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------
|
|
0
|
|
|
|
Reply
|
lpitcher2 (869)
|
9/11/2009 3:14:18 PM
|
|
On Sep 11, 11:14=A0am, Lew Pitcher <lpitc...@teksavvy.com> wrote:
> On September 11, 2009 11:03, in comp.unix.programmer, Ramon F Herrera
>
> (ra...@conexus.net) wrote:
>
> > I am experimenting with several tutorial "daytime" servers (UDP, TCP.
> > sync, async) which come with the C++ Boost libraries.
>
> > I was surprised to notice that, after the server was running:
>
> > (1) I was allowed to remove the executable (not being root at the
> > time)
>
> If your uid has write-permissions to a directory in which the executable
> file is registered, your uid can remove the filename. That's the way file
> permissions work in Unix.
>
> Remember that the file name is not the same as the file itself. The filen=
ame
> within a directory is simply a pointer to the file. While you may be able
> to remove the filename, the file itself
> =A0a) may have other filenames in other directories, and
> =A0b) won't go away until you delete *all* the filenames referring to it =
/and/
> =A0 =A0 close all filehandles currently accessing the file
>
> > (2) The server -much like the Energizer bunny- keeps on working.
>
> Yes, why should it not?
I do remember some time at a real Unix (not Linux) server, I tried to
remove a file and I got some message like "text is busy". That's why I
had that impression (not from crappy Windows).
-Ramon
|
|
0
|
|
|
|
Reply
|
ramon (1465)
|
9/11/2009 3:36:15 PM
|
|
Ramon F Herrera wrote:
> [...]
> I do remember some time at a real Unix (not Linux) server, I tried to
> remove a file and I got some message like "text is busy". That's why I
> had that impression (not from crappy Windows).
My guess is that you've misremembered the circumstances, and
that you were probably not trying to remove a file, but to overwrite
its content. That's a different matter entirely.
--
Eric.Sosman@sun.com
|
|
0
|
|
|
|
Reply
|
Eric.Sosman (4228)
|
9/11/2009 4:01:06 PM
|
|
On Sep 11, 12:01=A0pm, Eric Sosman <Eric.Sos...@sun.com> wrote:
> Ramon F Herrera wrote:
> > [...]
> > I do remember some time at a real Unix (not Linux) server, I tried to
> > remove a file and I got some message like "text is busy". That's why I
> > had that impression (not from crappy Windows).
>
> My guess is that you've misremembered the circumstances,
> and that you were probably not trying to remove a file,
> but to overwrite its content.
> That's a different matter entirely.
That could very well be the case, Eric.
Thx,
-Ramon
|
|
0
|
|
|
|
Reply
|
ramon (1465)
|
9/11/2009 4:08:25 PM
|
|
In article <1252684861.34751@news1nwk>,
Eric Sosman <Eric.Sosman@sun.com> wrote:
> Ramon F Herrera wrote:
> > [...]
> > I do remember some time at a real Unix (not Linux) server, I tried to
> > remove a file and I got some message like "text is busy". That's why I
> > had that impression (not from crappy Windows).
>
> My guess is that you've misremembered the circumstances, and
> that you were probably not trying to remove a file, but to overwrite
> its content. That's a different matter entirely.
I don't think he's misremembered. There were some versions of Unix that
performed this check in rm. A little googling found a mention of HPUX
10 doing this.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
|
|
0
|
|
|
|
Reply
|
barmar (5627)
|
9/12/2009 1:39:45 AM
|
|
|
5 Replies
33 Views
(page loaded in 0.08 seconds)
Similiar Articles: Accessing vxWorks FTP server via MFC - comp.os.vxworksHello, I have an vxWorks (5.4.2) FTP server running. I want to transfer a file to that server, but ... pINetSession->Close(); > > delete pFtpConnection; > delete ... inetconv - comp.unix.solaris... this imap/op3 server? How do I get rid of those services once they are transformed into xml files for the inetadm program? I guess I can't ... inetd.conf and re-running ... How the hell do I delete files on ZFS when file system is full ...I've got a problem on a Sun Blade 2000 running Solaris 10 update 7 with ZFS file systems. One of the file systems is full, but when I try to remove a ... How to delete files two days older from system - comp.unix.admin ...Hi, I have database backup which is running daily basis and storeing in some directory. I want to keep two current consecutive days backup file and wanna remove older ... How to remove Oracle 11g Instant Client Driver? - comp.databases ...To keep the server clear, can i delete the folder directly? ... to executed the installed file, but there is not any option to remove, ust ... databases.oracle.server ..... running how to remove a stale mount point - comp.unix.solaris... using the file and the results are above. My question is, how to do I remove this stale mount point w/o rebooting the server? ... re really running ... it, you can't remove it ... change the size of the /tmp (tmpfs filesystem) - comp.unix.solaris ...That'll remove the data in it when you do. > I ... however, I am > not sure whether I can do it while the server is running and ... xlswrite command to create new blank file ... Best way to delete old files? find & exec VS find & xargs - comp ...Maybe running -exec rmdir \{\} \; to get rid of the dirs, but how do I take care of the other ... files? find & exec VS find & xargs - comp ... find and delete files ... How to remove all subdirectory/file under current directory ...... to delete all the files" prompt in that very case (which you can ... running any ... server 5.2 uninstall problem - comp.unix.solaris ... How to remove all subdirectory/file ... VMWare Player running SCO 5.0.6? - comp.unix.sco.misc... have all 5.0.6 patches on a file system on my office 5.0.7 server ... ran the software manager to remove ... users of Solaris 10's ftp server - comp ... VMWare Player running ... I am trying to remove a folder on my server from my Offline Files ...I am running Windows 7 on my Laptop and Windows Server 2008 R2 on my server. ... that I don't want to do this, and I can't remove the folder from my offline files. Download Can't delete a file in Windows XP? Here's the simple way ...Can't delete a file in Windows? Here's what to do... Despite all ... closed), but the program is still running, try quitting the program. Windows will lock a file because the ... 7/24/2012 6:35:19 PM
|