program startup problem
Hi, I'm having a problem where a program of mine is crashing with a sigsegv, but I'm clueless as to why it happens. The same source runs fine on a variety of machines, including my cygwin setup at home, but a friend is seeing the following segfault with backtrace: (gdb) run H2O.inp Starting program: /home/psd127/bin/cp2k.sopt H2O.inp Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll Loaded symbols for /usr/bin/cygwin1.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/ws2_32.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/msvcrt.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/ws2help.dll 5 [main] cp2k.sopt 1128 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 423 [main] cp2k.sopt 1128 open_stackdumpfile: Dumping stack trace to cp2k.sopt.stackdump Program received signal SIGSEGV, Segmentation fault. 0x61016545 in stack_info::walk () from /usr/bin/cygwin1.dll (gdb) bt #0 0x61016545 in stack_info::walk () from /usr/bin/cygwin1.dll #1 0x7c859dcc in OutputDebugStringA () from /cygdrive/c/WINDOWS/system32/kernel32.dll #2 0x40010006 in ?? () #3 0x in ?? () (gdb) list 1 !-! I have to apologize for not being more precise, but I'm not even sure I understand the backtrace. This seems to be early during the program startup (i.e. before the main is reached) ? Could this be cygwin specific and/or does this ring a bell ? Many thanks in advance, Joost -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: RE: 1.5.21: Problems with fifos
On Tue, 5 Sep 2006, Dave Korn wrote: On 05 September 2006 09:39, Holger Kiehl wrote: Attached I have the cygcheck.out file. Please tell me if I forget to mention any information that could be usefull or what I can do to solve this. The single most valuable thing you could do would be try and extract a simple testcase that demonstrates the problem. AFD is a huge project and there may be many confounding factors; if you can write a little self-contained program that opens and uses fifos in the same fashion as AFD and shows the same effects, the problem would be a lot more tractable. I have managed to write a little test program that shows that the fifos do not work as I expected it. The attached program can be compiled simply by 'cc fifot.c'. When called without any argument it opens the fifo fifot.fifo and does a select on it to wait for some data to arrive. When called with an argument it opens the fifo for writting and writes Hallo Ballo!. Calling this program under cygwin as follows: ./a.exe 1 will cause it to block. Under linux it does not block and I would expect under any other unix like system it will not block either (which I have not tested). My understanding of fifos was that when I open a fifo for both reading and writting, I could write to a fifo without it blocking. Is cygwin handling fifos correct here and my understanding wrong? Regards, Holger#include stdio.h #include string.h #include sys/types.h #include sys/stat.h #include unistd.h #include fcntl.h #include errno.h #define FIFOT_NAME fifot.fifo int main(int argc, char *argv[]) { int readfd, val, writefd; struct stat stat_buf; if (stat(FIFOT_NAME, stat_buf) == -1) { if (errno == ENOENT) { if (mkfifo(FIFOT_NAME, S_IRUSR | S_IWUSR) == -1) { (void)fprintf(stderr, mkfifo() error : %s\n, strerror(errno)); exit(1); } } else { (void)fprintf(stderr, stat() error : %s\n, strerror(errno)); exit(1); } } if ((readfd = open(FIFOT_NAME, O_RDONLY | O_NONBLOCK)) == -1) { (void)fprintf(stderr, open() error : %s\n, strerror(errno)); exit(1); } if ((writefd = open(FIFOT_NAME, O_WRONLY)) == -1) { (void)fprintf(stderr, open() error : %s\n, strerror(errno)); exit(1); } if ((val = fcntl(readfd, F_GETFD, 0)) == -1) { (void)fprintf(stderr, fcntl() error : %s\n, strerror(errno)); exit(1); } val = ~O_NONBLOCK; if (fcntl(readfd, F_SETFD, val) == -1) { (void)fprintf(stderr, fcntl() error : %s\n, strerror(errno)); exit(1); } if (argc == 1) { intret; char buffer[13]; fd_set rset; FD_ZERO(rset); FD_SET(readfd, rset); ret = select(readfd + 1, rset, NULL, NULL, NULL); if (FD_ISSET(readfd, rset)) { if ((ret = read(readfd, buffer, 12)) != 12) { (void)fprintf(stderr, read() error (%d) : %s\n, ret, strerror(errno)); exit(1); } buffer[12] = '\0'; (void)fprintf(stdout, Have received `%s'\n, buffer); } else { (void)fprintf(stderr, select() error : %s\n, strerror(errno)); exit(1); } } else { if (write(writefd, Hallo Ballo!, 12) != 12) { (void)fprintf(stderr, write() error : %s\n, strerror(errno)); exit(1); } } exit(0); } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Send command and parameters into cygwin.bat
Now I can start an application in cygwin with a single command:-) @echo off C: chdir C:\program\cygwin\bin bash --login -i -c %xmds But how should I write if I want to start the application with a certain parameter or input file? What I would like to do is to run the following command xmds -i c:\path\ring.xmds. Best regards! Jonas Ă–gren [EMAIL PROTECTED] mwoehlke-2 wrote: mocs wrote: Ive would like to edit my cygwin.bat so a command into cygwin starts automatically with a document and some parameters, how should i write? 'man bash' -- Matthew KATE: Awesome Text Editor -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- View this message in context: http://www.nabble.com/Send-command-and-parameters-into-cygwin.bat-tf2129841.html#a6339347 Sent from the Cygwin Users forum at Nabble.com. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re[2]: add folder name to filename
hi Nikolaos NAP Fixed : NAP added a space after folder: NAP for file in folder */*; do ^^ NAP echo folder */* NAP dir=$(basename $(dirname $file)) NAP base=$(basename $file) NAP mv $file $(dirname $file)/${dir}_${base} NAP done Script started, file is typescript -- file - reserved word hint: man file -- Regards, oleyk mailto:[EMAIL PROTECTED] -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: downgrading make version
Hello Dave Korn wrote: On 10 September 2006 19:22, Amit Partani wrote: Run setup.exe, when you get to the package chooser, click 'Keep' to keep the rest of the installation the same, then in either the full or category view keep clicking on make until you get the 3.80 version selected. Am I mistaken or is this no longer a possibility? Looking through some of the mirrors [1], I can't seem to find the old version (3.80) of make. Any suggestions? [1] ftp://ftp.gwdg.de/pub/cygwin/release/make -- Best Regards Kovarththanan Rajaratnam -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: downgrading make version
On Sat, Sep 16, 2006 at 05:13:08PM +0200, Kovarththanan Rajaratnam wrote: Dave Korn wrote: On 10 September 2006 19:22, Amit Partani wrote: Run setup.exe, when you get to the package chooser, click 'Keep' to keep the rest of the installation the same, then in either the full or category view keep clicking on make until you get the 3.80 version selected. Am I mistaken or is this no longer a possibility? Looking through some of the mirrors [1], I can't seem to find the old version (3.80) of make. Any suggestions? [1] ftp://ftp.gwdg.de/pub/cygwin/release/make I've deleted the old version of make since this behavior will be the default if I make a new release and we really need to test the patched version. See: http://cygwin.com/ml/cygwin/2006-09/msg00078.html http://cygwin.com/ml/cygwin/2006-09/msg00131.html http://cygwin.com/ml/cygwin/2006-09/msg00153.html cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Send command and parameters into cygwin.bat
http://cygwin.com/acronyms/#TOFU. Reformatted. mocs wrote: mwoehlke-2 wrote: mocs wrote: Ive would like to edit my cygwin.bat so a command into cygwin starts automatically with a document and some parameters, how should i write? 'man bash' Now I can start an application in cygwin with a single command:-) @echo off C: chdir C:\program\cygwin\bin bash --login -i -c %xmds But how should I write if I want to start the application with a certain parameter or input file? What I would like to do is to run the following command xmds -i c:\path\ring.xmds. I see nothing wrong with the command you propose, with the exception that I recommend POSIX paths if 'xmds' is a Cygwin app. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/