Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Reimplementation of feature from the MV version.
* Added -wait option to nc that causes nc to wait for the file or files listed to be closed.
* Added -openwait option to nc that causes nc to wait for the file or files listed to be opened.
Logged In: YES
Last I remember, Arne and Mark were working on some
performance improvements. The changes were to reduce the
number and size of server properties.
I think this patch is a great idea and hope it is a reality
in 5.2 (though I have no idea in the world why I would want
to use -openwait).
Arne, for some reason, I can't assign things to you (another
SF bug?), so I'm assiging this to Mark temporarily.
Logged In: YES
- removed the -openwait feature
- that allowed me simplify and reduce the usage of fileOpen
so that such properties now only exist for files opened with
- in addition, to further avoid the buildup of properties
(or killed) servers, I now delete all fileOpen properties
host, user, servername when a new server must be started.
The drawback to this is that it makes it slower to start
a new server
because nc must fetch the names of all properties and
on them. On my machine I have approx. 50 properties at any
time so I
consider the delay negligible.
- However, I havn't been able to fix the use of timeouts in
still relying on 'random' events to trigger timeouts,
I would appreciate it anyone with more X experience to take
a look at
nc.c and see if it is possible to make this code better.
It has been pointed out that the -openwait feature is needed
to integrate NEdit with tools that spawn editors. They tend
to open editors on temp files, and attempt to clean them up
quickly, which opens a small race in which it could delete
the file before nedit opens it.
I will therefore attempt to reintroduce this feature, but
make it the _default_, instead of something you have to
explicitly request via a command line switch.
nc will now always wait until all files on the command line
are opened. i.e. the previous -openwait switch is now
default. However, there is no -noopenwait switch.
The -wait switch works as in previous versions of this
Two sets of properties are now used, one for files that are
in the process of being opened, another for files that have
been opened with the -wait switch. That simplified the code
a lot, and reduced the life-span of properties.
In addition, I found a way where I just create an atom, but
don't give it a value until the very last minute of its
lifetime. Thereby properties don't get left behind in the
root window in case of a crash (they don't show up with a
xprop -root | grep NEDIT). However, I don't know if this is
a general solution, or whether it just works by coinsidence
on Linux (with LessTif)
As before, the timeouts in nc.c still rely on 'random'
events to trigger, and I still would appreciate it if
someone with better X knowledge than myself could inmprove
on that. The main() function in nc.c had grown very large,
so it has now been split into a number of smaller functions.
So far it has only been tested on LInux.
nc -wait patch v.3
For your information, my latest patch (v.3) contains a
couple of bugs. nc doesn't exist if you try to open
non-existing files with -wait and press 'Exit NEdit' or
'Cancel' in the dialog.
I'm working on a fix for this.
v. 4.0 against CVS HEAD of 15 AUG 2002
Version 4 is a patch against CVS HEAD as of 15 AUG 2002.
Give it a try and report if you find anything wrong.
(I'll be on travel for about two weeks so don't expect any
answers during that period.)
Eddy De Greef
Logged In: YES
In cvs now -> closed.