RE: Possible race in SYSV IPC (semaphores)

2012-11-19 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> For testing it would be most helpful if you would create a STC. The test case attached from my earlier post from today, also shows a race (dead-lock, actually) occurring in CYGSERVER, when it is run with the "-d -l 7" command line (even when it is only one application, the test case is using it)

RE: Possible race in SYSV IPC (semaphores)

2012-11-19 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello again, I can now positively confirm the race condition in cygserver w.r.t. the named pipe used to serialize SYSV requests through the server. The race is due to that transport_layer_pipes::accept() (bool *const recoverable) (file: transport_pipes.cc) does actually _create_ the pipe when pi

Any idea windres does not work with native windows dlls/exes ?

2012-11-21 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hi, Could somebody please explain to me why windres complains about native windows dlls (let alone I can't get it work with new ones built on Cygwin). For example: windres /cygdrive/c/windows/system32/ntdll.dll windres: unexpected version string length 68 != 32 + 8 windres /cygdrive/c/wi

RE: SYSV semaphore bug (testcase attached)

2012-11-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> This is original FreeBSD code, so I have a hard time to follow the > idea > that it might be wrong. I stared a long while into the source now, > and > I compared that with the latest version of the upstream code. I noticed that the source is taken from FreeBSD and the test crashes just the same

RE: SYSV semaphore bug (testcase attached)

2012-11-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Can you please post a link to your bug report? I'd like to see > what they say and maybe contribute. http://www.freebsd.org/cgi/query-pr.cgi?pr=173724 Anton Lavrentiev Contractor NIH/NLM/NCBI

RE: Possible race in SYSV IPC (semaphores)

2012-11-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> This should avoid the race (*and* work...) > Please give it a try. Thanks! I've tried both patches (pipe race + semadj), and they do seem to work! Although (not being a party pooper :-), I think that all the logic around "pipe_instance" can now be dropped entirely, and benefit from eliminating

RE: Possible race in SYSV IPC (semaphores)

2012-11-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> I agree. I'll do that in the next couple of days. Thank you. Please let me know when you do, so that I can check the relevant snapshot out. Incidentally, have you been able to confirm the dead-locking that I reported earlier (below)? I just ran the patched cygserver with the "-d -l 7" argume

RE: Replacing fork/exec with spawn question

2012-11-25 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
>In particular, the code I'm looking to patch does a typical fork/exec and uses >2 pipes to communicate bi-directionally parent to child. The >pipes are throwing me off as to if cygwin spawn is usable. I had no problems using fork/exec on Cygwin, even though it is mentioned to be inefficient in

RE: Possible race in SYSV IPC (semaphores)

2012-11-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> I just checked in the change. Thank you. I will test it as soon as it's available in a snapshot. > ...especially since I can't reproduce this. I tried with cygserver > before and after my patch and in both cases your semaphore testcase > worked as expected with -d -l 7. I see. Maybe this wi

RE: Possible race in SYSV IPC (semaphores)

2012-11-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Correction: > cygrunsrv.exe -I cygserver -x /usr/sbin/cygserver.exe -a "-d -l 7" cygrunsrv.exe -I cygserver -p /usr/sbin/cygserver.exe -a "-d -l 7" Anton Lavrentiev Contractor NIH/NLM/NCBI

RE: Any idea windres does not work with native windows dlls/exes ?

2012-11-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> There is an issue about parsing version-resource in binary-format in > binutils. Perhaps there is more: an .rc file with version info compiled by the current windres does not populate almost any fields on the "Details" tab of the file properties (as shown by Windows). Anton Lavrentiev Contract

RE: Possible race in SYSV IPC (semaphores)

2012-11-27 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> You don't have space (or quota) issues on your hard disk by any chance? Nope, no quota whatsoever. Yes, the file grows big but there is plenty of free space on the disk. The machine is pretty slow, though, a dual-core thing. There's definitely another case of a race (the point of lock-up is

RE: Possible race in SYSV IPC (semaphores)

2012-11-28 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> > > I just checked in the change. > > > > Thank you. I will test it as soon as it's available in a snapshot. I've rebuilt cygserver, and it looks/works fine! Anton Lavrentiev Contractor NIH/NLM/NCBI

A bug in CYGWIN exec() and revision of argument values

2012-11-29 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hi, I stumbled across yet another problem (or two), now in CYGWIN exec() implementation, which is demonstrated by the test case. 1. Using CMD.EXE as a command with the "/C" switch (note the capital letter just as Windows documents this switch for CMD.EXE) does not trigger th

Cygrunsrv and special Windows virtual accounts "NT SERVICE"

2012-12-07 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hi all, I have a suggestion that cygrunsrv doesn't ask for any password with the option -u (and -w not provided), if the specified user is like "NT SERVICE\svcname", where svcname is the service being added. Otherwise, cygrunsrv is not self-sufficient for defining a service, and has to be further

FW: A bug in CYGWIN exec() and revision of argument values

2012-12-07 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hi, Just checking whether this is going to be fixed, or should be keep working around by passing the lowercased version of the "/C" switch ? > if (ac == 3 && argv[1][0] == '/' && argv[1][1] == 'c' && > (iscmd (argv[0], "

RE: Cygrunsrv and special Windows virtual accounts "NT SERVICE"

2012-12-07 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> cygrunsrv -I svcname -u "NT SERVICE\svcname" -p '' I'm not quite sure I follow your suggestion: -p is for path to the actual executable that implements the background process If you meant -w '' (or as documentation suggests '-w ') then it does not work for some reason -- cygrunsrv cannot ins

RE: Cygrunsrv and special Windows virtual accounts "NT SERVICE"

2012-12-07 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> per the bad user/pass combo, presumably). Per MSDN, http://msdn.microsoft.com/en-us/library/windows/desktop/ms682450%28v=vs.85%29.aspx : If the account name specified by the lpServiceStartName parameter is the name of a managed service account or virtual account name, the lpPassword paramete

RE: Cygrunsrv and special Windows virtual accounts "NT SERVICE"

2012-12-14 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Just checking whether this is going to be implemented... Thanks, Anton Lavrentiev Contractor NIH/NLM/NCBI > -Original Message- > Sent: Friday, December 07, 2012 11:50 AM > Subject: RE: Cygrunsrv and special Windows virtual accounts "NT > SERVICE" > > > per the bad user/pass combo, presu

RE: Cygrunsrv and special Windows virtual accounts "NT SERVICE"

2012-12-14 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> http://cygwin.com/ml/cygwin/2012-12/msg00154.html Thanks. > I'm wondering if it's such a bright idea to use a NULL password based on > a check for a certain domain. That's practically guaranteed to break > at one point again. I don’t think Microsoft is going to drop "NT SERVICE\" in any near

RE: Cygrunsrv and special Windows virtual accounts "NT SERVICE"

2012-12-17 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> what about '-w -' or a long-only option like --null-pwd? I'd be happy with either! Thanks, Anton Lavrentiev Contractor NIH/NLM/NCBI

Suggestion to make cygserver's unknown uid/gid messages more informative

2012-12-20 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, Could you please consider adding a bit more information to these two cygserver messages to help identify the offending user or group, for which they get issued: cygserver: WARNING: User not found in /etc/passwd! Using uid -1! cygserver: WARNING: Group not found in /etc/group! Using gid -1!

Mailing list problems anyone?

2013-03-22 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, Cygwin mailman clams to be having problems with our site bouncing the messages (which caused a silent bail on me recently, which I did not realize until later -- for complete silence form the list). My site administrator asserts that there is (and has never been) a CNAME for ncbi.nlm.nih.go

Server error 500 for snapshot list links?

2013-04-11 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hi, When I try to list the contents of the snapshots using the "List" links on the right, I get an internal server error 500 for the recent ones. Fails: http://cygwin.com/snapshots/winsup-src-20130409.tar Works: http://cygwin.com/snapshots/winsup-src-20130309.tar Please fix / advise, Anton Lav

Fresh Cygwin-64 instal reports post-install errors for bash

2013-04-22 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, Just wanted to share that while installing Cygwin64 on a clean PC, setup threw me the following postinstall errors: 2013/04/22 21:38:33 running: C:\Cygwin64\bin\bash.exe --norc --noprofile "/etc/postinstall/bash.sh" ln: failed to create symbolic link `/dev/stdin': Read-o

RE: Fresh Cygwin-64 install reports post-install errors for bash

2013-04-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Probably, for some weird reason, the 000-post-install was not run > before other scripts. Indeed, it wasn't. Here's the sequence of postinstall steps as logged, and it is far off from being alphabetical (if that's to ensure the order of things): 2013/04/22 22:45:21 Changing gid back to origina

RE: Fresh Cygwin-64 install reports post-install errors for bash

2013-04-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Why did you start a new thread for this reply?!? I did not. It's out friend MS with its Outlook auto-correcting :-) (before I was using a different agent which did not care). Sorry. > You just have to live with it for now. Okay. Anton Lavrentiev Contractor NIH/NLM/NCBI

Cygwin64 installed on D: gives errors on startup

2013-04-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello again, My new Cygwin64 installation (onto a clean PC), produces the following every time I start Cygwin terminal from the desktop icon. When the installation lived on C:\Cygwin64, it did not happen. But this time I installed it on D:\Cygwin64. It's interesting that starting the C

w32api lower version / mess in Cygwin 1.7.18 ?

2013-04-24 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, I've installed official Cygwin 1.7.18, and an application that uses w32api does no longer compile. Last time I used it with Cygwin 1.7.15 (where everything worked), and /usr/include/w32api/w32api.h had: #define __W32API_VERSION 3.17 #define __W32API_MAJOR_VERSION 3 #define __W32API_MINOR_

setrlimit() does not check for excess "cur" values

2013-05-01 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hi, It looks like Cygwin's implementation of setrlimit() does not check whether a "cur" value being set for a resource has been requested higher than the "max" value. It should have returned EINVAL. From the documentation (Linux): EINVAL resource is not valid; or, for setrlimit(): rlim->rlim_cur

Cygwin manpages clobbered

2013-05-09 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, I'm using stock Cygwin 1.7.18-1, and tried to read manpages about Cygwin path conversion routines, cygwin_conv_path() et al. The output does not appear formatted properly, e.g. DESCRIPTION goes as a single paragraph, but clearly is supposed to have some list formatting for the CCP bits and

Cygwin path conversion routines

2013-05-09 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello again, It'd be great to have http://cygwin.com/cygwin-api/func-cygwin-conv-path.html also document what happens if a path passed for conversion does already look good. E.g. what Win-2-Posix conversion does with things like "/cygdrive/c/cygwin" or just "/bin", and

RE: Cygwin manpages clobbered

2013-05-09 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Perhaps something has changed in your '/etc/man.conf' too? Thanks for the suggestions, but I did not touch anything from their standard settings after installation. And I checked my environment for any man settings, found nothing. FWIW, I am using very wide terminal (at least 132 cols, mintty)

Why mkgroup does not list group members?

2013-05-13 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, The current version of the mkgroup utility does not seem to care about group members when generating the group file (either out of domain or locally). I wonder what prevented it from using NetGroupGetUsers()/NetLocalGroupGetMembers() to list the group users after that last colon. Thanks,

RE: Why mkgroup does not list group members?

2013-05-13 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> so is extra work for no gain. But what if I need to see who's in a particular group? Then when I use getgrgid() / getgrnam() (or equivalent), I get an empty list. Anton Lavrentiev Contractor NIH/NLM/NCBI

RE: Why mkgroup does not list group members?

2013-05-13 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
I may have put it a bit incorrectly, > In that case, your expectations of the getgrXXX functions are wrong. but I don't think so. I am looking if a user belongs to a group, either as their primary or secondary one. So when using getgrXXX() I check to see if a user (whose primary, passwd-supplie

RE: Why mkgroup does not list group members?

2013-05-13 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> I'm shuddering to think of the memory requirements if all gr_mem > fields are filled in a bigger company. Well, for supplementary groups (which it was supposed to be used for) that does not actually look like very overwhelming... Anton Lavrentiev Contractor NIH/NLM/NCBI

RE: Why mkgroup does not list group members?

2013-05-13 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> you can also use the POSIX function Hmm.. It is listed as BSDism, wherever I looked.. > getgrouplist, which is implemented in Cygwin Anyways, thanks much for the hint, I'll look into it! Anton Lavrentiev Contractor NIH/NLM/NCBI

Why does CYGWIN implementation of getgrouplist() verify the supplied user or gid?

2013-05-13 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, Per a hint I've got earlier today from this list (and which I appreciate!), I've tried to use getgrouplist() to obtain group information about a user. There's a problem with that. I notice that the actual behavior of this call deviates from what's documented: nowhere in the documentation

Strange problem with find and directories

2013-05-15 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
end -- The same at either Windows-native drive (/cygwin/c/...) or a Cygwin mount (such as /home/$USER). BTW, dir is actually gone, but what was the fuss about? Thanks, Anton Lavrentiev Contractor NIH/NLM/NCBI -- Problem reports: http://cygwin.com/problems.html FAQ: h

RE: Strange problem with find and directories

2013-05-15 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> The same at either Windows-native drive (/cygwin/c/...) I meant /cygdrive/c/... Anton Lavrentiev Contractor NIH/NLM/NCBI -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe i

RE: Strange problem with find and directories

2013-05-15 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> I meant /cygdrive/c/... ... and I was trying to identify the problem myself but got into another thing, now with strace: when trying to use the "-f" flag that I used to use on Linux to trace child processes, the entire command just hanged: $ strace -f -o find.strace find . -nam

RE: Strange problem with find and directories

2013-05-16 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Fixed in CVS. Thank you! > Dunno where the man page error stems from Still, it'd be great to fix that, too. > -f, --trace-children trace child processes (toggle - default > true) But somehow when -f is specified, strace can't continue but gets stuck waiting for the child process to

RE: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Your locale is zh_CN.UTF-8. What you're expecting is only guaranteed > in the C locale: I'm not quite sure it applies here. I'm using US English Windows 7. LANG = 'en_US.UTF-8' I get the same result: $ echo abcdeABCDE | sed -e 's/[B-D]/_/g' ab__eA_

RE: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> The character ordering is based on the default Windows ordering for the > locale, and that's dictionary ordering, apparently. Ah, I see what you meant here. There's an elaborated explanation: http://www.gnu.org/software/gawk/manual/html_node/Ranges-and-Locales.html Anton Lavrentiev Contractor

inetd-like Windows processes with CYGWIN?

2013-07-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
ferent) Cygwin one, it gets to read STDIN then successfully replies to STDOUT). Also, I noticed that if I use the following command as "the native Windows process", /cygdrive/c/Windows/system32/cmd.exe /C "COPY CON" I see (the expected) pairs of CMD.EXE/conhost.exe in Windows Task

RE: inetd-like Windows processes with CYGWIN?

2013-07-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Also, I noticed that if I use the following command as "the native > Windows process", > > /cygdrive/c/Windows/system32/cmd.exe /C "COPY CON" > > I see (the expected) pairs of CMD.EXE/conhost.exe in Windows Task Manager > created per each request (n

FPE_FLTSUB where FLT_FLTINV is expected

2018-06-25 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, The following code produces FPE_FLTSUB(22) for the signal code whereas all platforms (Linux, Mac, FreeBSD) where I tested it, consistently yield FPE_FLTINV (which on CYGWIN has a value of 21): #define _GNU_SOURCE #include #include #include #include #include void sigfpe(int signo, si

compiler-rt has an extra spurious file?

2018-07-05 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hi, This file is placed at the root of the Cygwin tree when the compiler-rt package gets installed: llvm-objdump.exe.stackdump Is that really necessary? Thanks, Anton Lavrentiev -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentati

FPE in localtime.cc

2018-07-09 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
957 rsi=51EB851F rdi=2CC3D8D4A245F203 r8 =00F92B80 r9 =FFED r10=07E2 r11=000C r12= r13=8000 r14=00BD r15=07E2 rbp=7FFF rsp=CA70 program=C:\Cygwin64\...\a.exe, pid 14232, thread main cs=

Cygwin strptime() is missing "%s" which strftime() has

2017-07-22 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, It looks like Cygwin implementation of strptime(3) cannot understand the "%s" format (seconds since Jan 1, 1970 UTC), which strftime() can. When I test the same code of Linux, it appears to work correctly. Cygwin: $ gcc -Wall -o timetest timetest.c $ ./timetest 1500755837 -> 1500755837 C

Re: Cygwin strptime() is missing "%s" which strftime() has

2017-07-23 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> But that's just scanning a decimal integer to time_t. It's not a question of whether I can or can't convert a string into an integer, rather it's a question about portability of code that uses %s for both functions and expects it to work unchanged in the Cygwin environment. Also, strptime()

Re: Cygwin strptime() is missing "%s" which strftime() has

2017-07-24 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> > > But that's just scanning a decimal integer to time_t. > > > > It's not a question of whether I can or can't convert a string into an > > integer, rather it's a question about portability of code that uses %s > I see your point but... "portability" is kind of the wrong expression > here. If

Re: Cygwin strptime() is missing "%s" which strftime() has

2017-07-24 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> Demand. I patches strftime to add %s because Coreutils wanted it. But > coreutils doesn't use strptime, so I had no reason to add it. Well, I was bringing up a point of API inconsistency, hoping that it'd serve as an implicit request for an improvement so that strptime() gets its "%s"... May

Re: Cygwin strptime() is missing "%s" which strftime() has

2017-07-24 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> then its use of %s in either of those functions constitutes a _bug_ Oh really? Is that why "%s" was added to Cygwin's strftime() lately? Thanks again for your input. Anton Lavrentiev Contractor NIH/NLM/NCBI -- Problem reports: http://cygwin.com/problems.html FAQ: htt

Sparse files in Cygwin

2017-07-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello, I have a question whether sparse files are supported in Cygwin. From the source code, it looks like they are, but from the series of the following commands, I can't confirm: $ dd bs=1 seek=1G if=/dev/null of=sparse 0+0 records in 0+0 records out 0 bytes copied, 0.00392699 s, 0.0 kB/s $

'tac' trying to use "/tmp"; Error: not found

2023-04-02 Thread Prof. Luis G. Uribe C. via Cygwin
¯¯* I didn't see this problem in older 'tac' versions... I created "/tmp" under my root directory: *"c:\tmp"* (Windows 10), *to no avail*. I make a *tmp* dir directly *above*, in the *parent's 'tac' dir*: *"../tmp"*, at

RE: [EXTERNAL] BUG: /usr/bin/uptime always reports 0/0/0 average

2024-08-27 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> /usr/bin/uptime always reports 0/0/0 average cpu load: WJFFM $ uptime 10:33:16 up 6 days, 14:06, 0 users, load average: 1.88, 2.04, 2.06 $ cat /proc/loadavg 1.88 2.04 2.06 2/5 Anton Lavrentiev Contractor NIH/NLM/NCBI -- Problem reports: https://cygwin.com/problems.html FAQ:

Process limit in CYGWIN?

2019-12-03 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi all, I have some test code that forks number of processes, and it looks like under Cygwin it fails at fork number 255 (plus minus one). There is no getrlimit()'s RLIMIT_NPROC on Cygwin (unlike Unices) yet I see that my shell somehow shows the process limit of 256: $ ulimit -u 256 I tried to

Request to update the coreutils package

2019-12-17 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi all, I don't know how current this file is: https://cygwin.com/cygwin-pkg-maint but was the coreutils package orphaned? It's like 4 years old now. It'd be great if it could be refreshed in Cygwin. Thanks, Anton -- Problem reports: http://cygwin.com/problems.html FAQ:

RE: [BUG] try..catch does not work if compiled with clang 8.0

2019-12-18 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
The problem maybe in ABI incompatibility with older C++ (not C++11-compliant) run-time libraries: In C++11 class inheritance for many standard exceptions has changed greatly, so all the run-time libraries must be recompiled to match the inheritance seen by the compiler in the header files

Is there a way to clone-install Cygwin?

2020-01-20 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
sort of a batch install with setup.exe? I want to avoid to dumb-copy the entire C:\cygwin tree from one PC to another, rather use a semi-automatic install procedure from scratch, if possible, using the list of packages that I need. Thanks for all the insights you can provide. Cheers, Anton

RE: Is there a way to clone-install Cygwin?

2020-01-20 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
't occur to me, then please read my original message that said: > > I want to avoid to dumb-copy the entire C:\cygwin tree from one PC to > > another Thank you for your time, though. Anton -- Problem reports: http://cygwin.com/problems.html FAQ:

Looks like GDB in Cygwin does not catch Ctrl/C correctly

2020-01-20 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi All, Another question for tonight: So there's a program that basically enters a tight loop on some incorrect input (and needs to be debugged, obviously). The program is otherwise rather basic, doesn't use anything outside K&R C RTL. When I run the program under gdb, I want t

RE: Looks like GDB in Cygwin does not catch Ctrl/C correctly

2020-01-20 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> What is your environment? Windows version, cygwin version and etc... $ uname -a CYGWIN_NT-6.1 ANTON 3.1.0(0.340/5/3) 2019-12-01 05:20 x86_64 Cygwin Windows 7 Home; Cygwin 3.1.0 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentatio

Re: Is there a way to clone-install Cygwin?

2020-01-21 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> attached my solution to re-install or duplicate the packages of an existing > installation. Thank you, Marco! I'll give that a try. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsub

Re: cygrunsrv does not start cygsshd at boot

2020-01-28 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> As the reg entries show, you can also do this by adding or setting registry > entries using Cygwin regtool, Windows reg, or regedit commands. It is better and much safer to use native Windows service controller commands, than tweaking the registry: sc config cygsshd start= delayed-auto Also,

RE: Is there a way to clone-install Cygwin?

2020-01-28 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Yes, this is possible. Thank you. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

Re: cygrunsrv does not start cygsshd at boot

2020-01-29 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Don't see where you read that? The service control manager waits until the service stops or the specified preshutdown time-out value expires (this value can be set with the ChangeServiceConfig2 function). This control code should be used only in special circumstances, because a service that h

coreutils refresh request (again)

2020-05-31 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
Hi All, Having upgraded my Cygwin install today, I still see the old coreutils package v8.26, from 2016. Looks like the current version is now 8.32, released in March this year. Can Cygwin please get this updated? Thanks, Anton -- Problem reports: https://cygwin.com/problems.html FAQ:

CPU microcode reported wrong in /proc/cpuinfo

2020-05-31 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
Hi All, In the updated Cygwin (3.1.4), /proc/cpuinfo still reports the microcode version wrong. Compare: Cygwin: $ uname -a CYGWIN_NT-6.1 xxx 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin $ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model

RE: CPU microcode reported wrong in /proc/cpuinfo

2020-06-10 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
quot;System" CurrentType (REG_SZ) = "Multiprocessor Free" InstallDate (REG_DWORD) = 0x54373393 (1412903827) RegisteredOrganization (REG_SZ) = "" RegisteredOwner (REG_SZ) = "ANTON" SystemRoot (REG_SZ) = "C:\Windows" InstallationType (REG_SZ) = "Cl

RE: coreutils refresh request (again)

2020-06-10 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> https://cygwin.com/pipermail/cygwin/2020-June/245104.html Wow dude! I did not expect a whole sob story out of that simple reminder; I did not urge anybody to do it right away, yet I just mentioned that the package was way out of its release cycle. I think that the time it took you to write al

RE: coreutils refresh request (again)

2020-06-10 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> but it is missing the patch used to adapt it to Cygwin. > The patch modifies 27 files and unfortunately does not applies > clean to latest upstream source. Fair enough (and again, there was no pushing); but are you sure that all 27 patches are still actual? Testsuite ran pretty well, though.

RE: CPU microcode reported wrong in /proc/cpuinfo

2020-06-10 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> I'll have to recheck how Linux handles these JFYI I was in correspondence with the cpuid utility team lately, and they told me that Linux uses vendor-specific MSRs to pull that info out: > Check out: > >MSR_IA32_UCODE_REV >MSR_AMD64_PATCH_LEVEL > > Both reference MSR 0x8b. -- Proble

RE: CPU microcode reported wrong in /proc/cpuinfo

2020-07-16 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
was reported for all cores after the initial boot-up, all other cores are reported with some old microcode version (I presume that's the microcode that Windows has on its own in one of its CPU driver DLLs). So for core 0 it is as it was (and for all of them after the boot-up): C:\Windows\sy

RE: CPU microcode reported wrong in /proc/cpuinfo

2020-07-16 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> So I think you probably encountered another Windows sleep bug Quite possibly... The microcode version in the registry looks okay after wake-up from hibernate, though (but that subsumes the system POST and clean boot). > 0 - ucode loading supported by CPU - update available and successfully

RE: CPU microcode reported wrong in /proc/cpuinfo

2020-07-16 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> https://software.intel.com/security-software-guidance/insights/microcode-update-guidance Thanks, interesting reading. I think in my case the ucode update is done via the FIT method, though, as the latest microcode (0xA0E) is included in the re-packaged BIOS, and re-flashed into ROM along with

Ping crashes

2018-10-27 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
03 r14=0001 r15= rbp=0018 rsp=CAA0 program=C:\cygwin64\bin\ping.exe, pid 6496, thread main cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygw

iostream exceptions uncaught with CYGWIN GCC/7.3.0

2018-11-01 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
uot; << endl; } catch (...) { cerr << "Failure uncaught! 0x" << hex << cin.rdstate() << endl; } return 0; } When this program is compiled and run on Linux, the exception gets caught: $ uname -a Linux iebdev11 3.10.0-862.14.4.el7.x8

SOCK_NONBLOCK not honored

2018-11-01 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi, Looks like CYGWIN defines but does not honor the SOCK_NONBLOCK flag when used with socket(2). (It also defines SOCK_CLOEXEC but I haven't checked whether it is honored -- full disclosure.) Consider the following code: $ cat bug.c #include #include #include #include #include #include

Re: iostream exceptions uncaught with CYGWIN GCC/7.3.0

2018-11-02 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Cygwin GCC is configured and built with the old C++ ABI, I'm guess that's the > problem? The problem is that it does not work correctly because G++ and its run-time are not consistent. GCC doc says version 7.x uses new ABI by default, so I'd guess that's the C++ s

chattr version/verbose options

2019-01-18 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi, Thank you for adding the chattr/lsattr utilities to Cygwin base, I think they can come very handy. May I have a small suggestion, please: To use -V/--version (that lsattr does already) consistently for both, and -v/--verbose in chattr (and update the docs too). -V is conventionally used f

Problem with cygserver (LookupAccountSid()) -- interlocking with its clients

2019-02-13 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
main] ipcs 872 mount_info::conv_to_win32_path: src_path /dev, dst C:\Apps\Admin_Installs\lbsmd\dev, flags 0x3000A, rc 0 313 4682675 [main] ipcs 872 symlink_info::check: 0x0 = NtCreateFile (\??\C:\Apps\Admin_Installs\lbsmd\dev) 106 4682781 [main] ipcs 872 symlink_info::check: not a symlink

More information: Problem with cygserver (LookupAccountSid()) -- interlocking with its clients

2019-02-13 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
I was trying to figure out what SID cygserver was trying to access... When I run ipcs without cygserver running, I see this SID is being retrieved successfully: 359 2451151 [main] ipcs 10404 pwdgrp::fetch_account_from_windows: line: When I run ipcs with cygserver, the SID, which looks very

cygrunsrv to have a timeout parameter for service startup

2019-02-14 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi all, It looks like the cygrunsrv utility hardcodes 30 seconds as a maximal time for a service to start, then bails out with a failure. It would be quite useful (in certain situations) to have a command-line parameter (for the -I option) that can specify a service startup timeout, longer or s

RE: cygrunsrv to have a timeout parameter for service startup

2019-02-15 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> No, 30 seconds is a hard system timeout in which a service must reply with > an appropriate control message to let services.exe know it is ready to > continue startup sequence. I don't think there is a hard-coded system timeout, as long as the starting service keeps posting its START_PENDING st

Question about the ldd output

2019-07-05 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi all, Here's the output from ldd, of an executable built just recently on Cygwin: ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffc339d) KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffc31a0) KERNELBASE.dll => /cygd

Re: Question about the ldd output

2019-07-08 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
. Why the output differs so drastically (including the unknown dlls all of a sudden)? 1. ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffc339d) KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffc31a0) KERNELBASE.dll => /cygdrive

Re: Question about the ldd output

2019-07-08 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
ndeterministic" result (the executable itself is much simpler than the one from my previous post, so the list of DLLs is quite short): 1. ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffc339d) KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERN

TCP_CORK (aka TCP_NOPUSH) does not work

2019-07-30 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi, Consider the following code: $ cat cork.c #include #include #include #include #include #include #include #include #include #if defined(TCP_NOPUSH) && !defined(TCP_CORK) # define TCP_CORK TCP_NOPUSH #endif int main(int argc, const char* argv[]) { union { struct sock

Re: TCP_CORK (aka TCP_NOPUSH) does not work

2019-07-30 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Regular SO options on Windows: I did not ask about Windows options. I asked about a feature that is defined in Cygwin yet appears not functional. > You can abuse Nagle to get similar behaviour cross-platform: This is not the same thing! > ENOPROTOOPT (109)... "The option is not supported by

Re: TCP_CORK (aka TCP_NOPUSH) does not work

2019-07-31 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Linux and BSD options are not available, whatever the .h #defines. Unsupported options should not be shown as features in the headers. > Many header and library files are shared with newlib, which is used by Cygwin If you checked before responding with a large digress into unrelated details, y

Re: TCP_CORK (aka TCP_NOPUSH) does not work

2019-07-31 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Why not just write a patch to fix this and send it to the cygwin-patches > mailing list? I had first to make sure that the feature is indeed unsupported (and I wasn't 100% certain because it was included in the header). Actually, nobody confirmed to me that I am not "seeing things", only taugh

Empty file without "x" permission is successfully executable on Cygwin

2019-08-05 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi, Please consider the following shell session: $ cat dummy.c #include int main() { return 0; } $ gcc -o dummy dummy.c $ mv dummy.exe dummy $ ./dummy $ echo $? 0 $ chmod a-x dummy $ ./dummy -bash: ./dummy: Permission denied $ rm dummy $ touch dummy $ ./dummy $ echo $? 0 So Cygwin lets the

getpriority() and top display for priority is inconsistent

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
I have noticed a discrepancy between the process priority shown by "top" vs. what getpriority() returns. I'm using the procps-based "top", so it reads the priority value from /proc/PID/stat. The value gets there via code found in "fhandler_process.cc": /* The BasePriority returned to a 32 bi

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> zero-sized? Irrelevant. It is actually very relevant. Because executing an empty script results in "success" (exit code 0) -- that creates a false-positive. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cy

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> But what's your basis for saying that an empty script shouldn't be executable? I meant it only in the context of the script file lacking the proper "x" permission. Of course an empty script _with_ such permissions allowed must be executable, and it will always complete with exit code 0. -- P

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Which is why, as Ken said, the size is irrelevant. Which makes your comment irrelevant as well. Read the thread what I was responding and to whom before trolling. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: htt

Re: Empty file without "x" permission is successfully executable on Cygwin

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> I did read the thread. Really? > which you confirmed after the fact. Oh really? Then read again: In my initial post that started the entire thread I wrote: > On Unix, an empty file can only be executed (exit code 0) if there's the "x" > permission granted. So what's your deal, exactly?

<    1   2   3   4   5   6   7   >