Re: pipe data form windows program to cygwin program
Hi bob thanks for your help, i solve the problem bny using only windows functions to have a pipe and that is working well. It seems that posix and windows doesn't work well together. bertrand Le ven 29/10/2004 04:18, Bob Byrnes a crit : | Are you *sure* that you have closed *all* of the write handles to the pipe? | If any write handles remain open, then EOF won't be delivered to the | read side of the pipe. i think i did, but even if i didn't the fact that the program exit normally will close all open handles under windows, won't it ? It's true that all open handles for the parent process will be closed on exit. However, if handles for the write side of the pipe were passed to the child process, and any of them remain open, then that's a problem. This appears to be the case for your sample program. Here are some suggestions: -- If you only need to write out some compressed data, try linking with zlib and calling one of the gzip functions: some examples are provided with the zlib source distribution. This is simple (no pipes or subprocesses), efficient, and effective. -- If you really do need a pipe to a subprocess, consider using popen(), which does all of the work for you. -- If for some reason you need to do all of the pipe and process creation stuff yourself, be sure to close all of the unneeded file descriptors in the child process as well as in the parent process. The usual technique looks something like this: int pfds[2];// pipe file descriptors pipe(pfds); // make the pipe if (fork() == 0) { // child // connect stdin to read side of pipe dup2(pfds[0], STDIN_FILENO); // close unneeded pipe descriptors close(pfds[0]); close(pfds[1]); execlp(gzip, ...); } else { // parent // connect stdout to write side of pipe dup2(pfds[1], STDOUT_FILENO); // close unneeded pipe descriptors close(pfds[0]); close(pfds[1]); // write to stdout // close stdout, or exit } Alternately, the parent could just write to pfds[1], the write side of the pipe, if you don't want or need to mess with stdout. But it's still important to close pfds[0], the read side of the pipe, in the parent process. Either way, there are no stray open file descriptors for the pipe in any process, so when the parent closes the write side of the pipe, the child should see EOF on the read side. One final suggestion: I'd try to avoid mixing the win32 and posix APIs. Life is complicated enough without trying to deal with win32 HANDLEs and posix (int) file descriptors at the same time, or using functions like DuplicateHandle() and dup2() in the same program. HTH ... -- Bob -- 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/ -- 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: pipe data form windows program to cygwin program
Le mer 27/10/2004 21:37, Bob Byrnes a crit : I'm writing a program which need to send data to a cygwin program using a pipe on the stdin (actually data to compress using gzip). All is working well but at the end of the program when i close the pipe it seems that gzip doesn't see that the pipe has been closed and so it stay open. Are you *sure* that you have closed *all* of the write handles to the pipe? If any write handles remain open, then EOF won't be delivered to the read side of the pipe. i think i did, but even if i didn't the fact that the program exit normally will close all open handles under windows,won't it ? I kind of think there must be something with windows-cygwin EOF but i can't find out what. Is anyone has an idea ? If you can provide a (very) simple test case that exhibits allegedly incorrect behavior, that would be helpful. i will try to do this as soon as possible, thanks for help bertrand -- Bob -- 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/ -- 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: pipe data form windows program to cygwin program
hi again, i join to this mail an example. This must be compiled with mingw compiler. the program is going great but at the end gzip( or you can try with cat to see that data is in output file) stay open. bertrand Le mer 27/10/2004 21:37, Bob Byrnes a crit : I'm writing a program which need to send data to a cygwin program using a pipe on the stdin (actually data to compress using gzip). All is working well but at the end of the program when i close the pipe it seems that gzip doesn't see that the pipe has been closed and so it stay open. Are you *sure* that you have closed *all* of the write handles to the pipe? If any write handles remain open, then EOF won't be delivered to the read side of the pipe. I kind of think there must be something with windows-cygwin EOF but i can't find out what. Is anyone has an idea ? If you can provide a (very) simple test case that exhibits allegedly incorrect behavior, that would be helpful. -- Bob -- 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/ #include stdio.h #include windows.h #include fcntl.h #include process.h main() { HANDLE newstdout,newstdin,parent,handles[2]; int phandles[2],compressor_pid,archivefd; /*open a file to put data on*/ archivefd = open(test.gz, O_WRONLY | O_TRUNC | O_CREAT | O_BINARY,0666 ~umask(0)); /*save current handles*/ parent=GetCurrentProcess (); handles[0] = GetStdHandle (STD_INPUT_HANDLE); handles[1] = GetStdHandle (STD_OUTPUT_HANDLE); /*create a new pipe*/ _pipe(phandles,0,O_BINARY); /*set pipe of stdin of process form our stdout*/ DuplicateHandle (parent, (HANDLE) _get_osfhandle (archivefd), parent, newstdout, 0, TRUE, DUPLICATE_SAME_ACCESS); /*set pipe of stdout of process to open file*/ DuplicateHandle (parent, (HANDLE) _get_osfhandle (phandles[0]), parent, newstdin, 0, TRUE, DUPLICATE_SAME_ACCESS); /*replace standard handles*/ SetStdHandle (STD_INPUT_HANDLE, newstdin); SetStdHandle (STD_OUTPUT_HANDLE, newstdout); /*start process*/ compressor_pid= spawnlpe(_P_NOWAIT,cat,NULL, NULL); /*restore standard handles*/ CloseHandle (GetStdHandle (STD_INPUT_HANDLE)); CloseHandle (GetStdHandle (STD_OUTPUT_HANDLE)); SetStdHandle (STD_INPUT_HANDLE, handles[0]); SetStdHandle (STD_OUTPUT_HANDLE, handles[1]); /*close pipe unneeded and duplicate pipe input to archivefd*/ dup2(phandles[1], archivefd); close(phandles[0]); close(phandles[1]); /*output data to gzip*/ write(archivefd,abcdefghijklmnopqrstuvwxyz,26); /*close our handles*/ close(archivefd); /*exit*/ 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/
pipe data form windows program to cygwin program
Hi, I'm writing a program which need to send data to a cygwin program using a pipe on the stdin (actually data to compress using gzip). All is working well but at the end of the program when i close the pipe it seems that gzip doesn't see that the pipe has been closed and so it stay open. I kind of think there must be something with windows-cygwin EOF but i can't find out what. Is anyone has an idea ? thanks Bertrand -- 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: setup for all users
Le jeu 07/10/2004 13:05, Max Bowsher a crit : Jens Wilken wrote: I made some changes to the setup to allow commandline configuration for all user changeable settings (except package selection). We use this extended setup for automatic installations, so the user has no chance to change the expected settings and cause horrible things ;) Is someone interested in the patch? Please! We can try to merge it into the official setup if you are willing. I'm doing more or less the same thing, i run setup in completely quiet mode specifying all i want and it is working well. You must run : setup.exe -q -n -5 -L -R install_directory The only thing is, as i'm using install from local directory and i want to install everything there is in this directory, i have to modify the setup.ini to put all the packages i had into default group to, as this they will be installed. But it seems that the setup is running for only user and not all user. The solution i found was simply, after the end of the setup, copy all entry in HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\ to HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\ and this enable cygwin for every user. Bertrand Max.
/tmp/.X11-unix in multi-user environnement
Hi, I'm using cygwin on a windows workstation with several user. The Xwin server user a directory placed in /tmp named .x11-unix. The problem is that when one user create it, all other user can't start XWin as they are not able to overwrite to this file. Is there any way to specifie an other place for this or to put it into home directory as it should be i think ? Bertrand
setup for all users
Hello, I'm running cygwin setup in quiet mode and i want to do it with all users options. i thought it was set by default as it is when you run the setup in standard mode but when i install cygwin as regular user under windows xp or 2000 the mount entry in the registry are set into HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE. Is there any way to force setup to install using all users option or to set it to register into HKEY_LOCAL_MACHINE and not HKEY_CURRENT_USER. I'm using latest cygwin release from cygwin.com Thanks Bertrand
Re: How to make setup not look for external mirrors
Hello, there is an option to the setup in command line specifying the mirror site, perhaps could you try that. see http://sources.redhat.com/ml/cygwin-apps/2003-03/msg00526.html for more info. bertrand Le mer 06/10/2004 09:50, Carlo Florendo a crit : Hello great cygwin people! I have mirrored cygwin and made the installation accessible via http on our local web server. There are some boxes that may access only LAN resources and I want those boxes to have cygwin. When I start running setup on those boxes, I select download from internet (since I have the entire distro on the local http server). Thus, I assume that the local web server accessible via http is the internet site where cygwin will be installed from. Everything is fine until I get to the point of downloading the list of mirrors. Since the boxes do not have Internet connections, they won't be able to download the mirror list. Installation stops from that point. Is there any way via setup to install cygwin from my local http server? Thanks! Best Regards, Carlo -- Carlo Florendo Astra Philippines Inc. www.astra.ph -- 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/ -- 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: Problem regarding CYGWIN
hello, did you choose to install make and gcc during cygwin install ? because make is installed in /bin to that can be your problem. you need to restart the setup and to add those packages i think bertrand Le mar 21/09/2004 15:21, Mahboob Ali a crit : Hi, My name is Ali, I am the student of TU Dresden, Germany. I am having a problem while using CYGWIN. I am trying to install Mbius software on my maching and for this software i need CYGWIN as backend, which i installed successfully. Now the problem lies when i try to install Mbius on my machine it needs the path where i install CYGWIN, but when i gave this path it gives me the following error, File C:\CYGWIN\BIN\make.exe does not exist, i have checked the directory on CYGWIN\BIN and there is no file named make.exe. Can you please guid me what should i do now, where can i find this file? I really need to install this software for my Project. Thanking you. Regards, Ali Mahboob. -- 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/ -- 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/
log files of setup
Hello, i need to install a small cygwin from a cd-rom. So i downloaded what i need from a mirror and then put it on a cd. Then i made a bat script to run setup automatically specifying all the options i need : setup.exe -q -n -L -5 -l D:\ -R C:\cygwininstall this is working well from a hard drive but from a cd-rom, as there is no write access the setup is complaining that it cant't open D:\setup.log is there any option to disable log file ? thanks bertrand
Re: log files of setup
oops... sorry it was my mistake in the localdirectory which was wrong.. in fact it is working well as logs are written directly in the install directory. bertrand Le mer 08/09/2004 10:18, bertrand marquis a crit : Hello, i need to install a small cygwin from a cd-rom. So i downloaded what i need from a mirror and then put it on a cd. Then i made a bat script to run setup automatically specifying all the options i need : setup.exe -q -n -L -5 -l D:\ -R C:\cygwininstall this is working well from a hard drive but from a cd-rom, as there is no write access the setup is complaining that it cant't open D:\setup.log is there any option to disable log file ? thanks bertrand
Re: setup
Le mar 07/09/2004 16:52, Colin JN Breame a crit : Is there a way of installing packages on the command line? i think you can dowmload the packages form a server than you will have to extract them in / using tar -xjf ... than you will have to run the postinstall scripts in /etc/postinstall i have tried that to install small packages and it is working This won't work if you don't have cygwin already installed ;-) I think this could also be a problem if you have an old release of the program installed as it doesn't remove the old files as the setup the last thing is that i don't think that the packages will be registered for cygwin and so you won't see then in cygcheck... bertrand PS: if someone know a way to do that in a better way i'm interested. -- 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/ -- 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: cygwin implementation of fork() eating all resourses?
Hi, i had the same behaviour under windows xp. It seems that you need to give back the end to the system sometimes in a while(1) unless it will take all resources of the system and the child won't do anything. i had the problem waiting for a network message which wasn't able to be received as the process took all resources. The solution for me was only to put a usleep in c code to be shure that windows take back the hand from time to time. By the way this doesn't append for me on windows 2000 i used windows xp sp2 with cygwin 1.5.10-3 Bertrand Le lun 06/09/2004 10:48, Corinna Vinschen a crit : On Sep 6 08:42, Artem Gluhov wrote: After 5 minutes running this script i got a windwows XP error: not enough system resourses. -- #!/bin/bash while (( 1 )); do ls /dev/null; done; -- Hmm, I tried it for 15 Minutes but the resource usage was stable. Is that with the current Cygwin release? Corinna -- 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: configure-script failure
Le lun 30/08/2004 07:50, Jani tiainen a crit : Why sometimes running ./configure doesn't work? Usually it reports that some feature is missing, but running second time with same parameters doesn't produce error.. like: configure --prefix=/target --disable-static in first run I usually get no such feature 'static' (or similiar). On second run with exactly same parameters it works. Any explanations for a such behavior? Hello i run through the same problem from times to times running configure scripts and i didn't find any other solution than running the configure again. This is quite borring and i was not able to find any solution. I would also be interested in a solution or an explanation if someone has one. bertrand -- 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/
python 2.3 pydoc : sys.modules.get error
hello, i'm using pydoc to generate informations out of python source. But sometimes i've got this error: Traceback (most recent call last): File /usr/bin/pydoc, line 4, in ? pydoc.cli() File /usr/lib/python2.3/pydoc.py, line 2119, in cli help.help(arg) File /usr/lib/python2.3/pydoc.py, line 1581, in help elif request: doc(request, 'Help on %s:') File /usr/lib/python2.3/pydoc.py, line 1375, in doc pager(title % desc + '\n\n' + text.document(object, name)) File /usr/lib/python2.3/pydoc.py, line 283, in document if inspect.ismodule(object): return self.docmodule(*args) File /usr/lib/python2.3/pydoc.py, line 958, in docmodule if (inspect.getmodule(value) or object) is object: File /usr/lib/python2.3/inspect.py, line 373, in getmodule return sys.modules.get(object.__module__) SystemError: error return without exception set this is happening sometimes when trying to have doc out of compiled modules (*.dll) any idea ? bertrand
cygserver shmat
Hello, i'm trying to use shmat specifying an address but each time i got the error: invalid argument. in fact i need to map something just next to something previously mapped without argument. is this a limitation of cygserver ? thanks -- 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: cygserver shmat
Le jeu 12/08/2004 11:32, Corinna Vinschen a crit : On Aug 12 11:23, bertrand marquis wrote: Hello, i'm trying to use shmat specifying an address but each time i got the error: invalid argument. in fact i need to map something just next to something previously mapped without argument. is this a limitation of cygserver ? What address are you trying? Keep in mind that the address must be a multiple of SHMLBA, except you're using the SHM_RND flag. See http://www.opengroup.org/onlinepubs/009695399/functions/shmat.html Corinna In fact i wasn't using the SHM_RNd flag. In details here is what i do: - get a shared segment of with size= SIZE (SIZE multiple of SHMLBA) - attach the segment without specifying address and storing the result in beginaddress - attach the segment again specifying the address: endposition= beginaddress + SIZE without SHM_RND in the second shmat i've got the error : invalid argument now that i specifie SHM_RND in the flag i have the error: value to large for defined type any idea ? thanks bertrand -- 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: cygserver shmat
Le jeu 12/08/2004 12:44, Corinna Vinschen a crit : On Aug 12 12:13, bertrand marquis wrote: In fact i wasn't using the SHM_RNd flag. In details here is what i do: - get a shared segment of with size= SIZE (SIZE multiple of SHMLBA) - attach the segment without specifying address and storing the result in beginaddress - attach the segment again specifying the address: endposition= beginaddress + SIZE without SHM_RND in the second shmat i've got the error : invalid argument now that i specifie SHM_RND in the flag i have the error: value to large for defined type any idea ? Nope. Not without knowing the actual values. An strace output of the affected calls would be good. Even better, create a simple testcase which allows to reproduce the behaviour. Just the minimum of necessary code. Corinna Ok, i have made a minimum program showing the problem. You can try specifying or not SHM_RND in the second shmat, without i have INvalid argument error and with i have value too large for defined data type. thanks bertrand #include cygwin/shm.h #include cygwin/ipc.h #include stdio.h #include errno.h #define SHM_R 0400 #define SHM_W 0200 main() { int sh_key,sz; unsigned int size=100; unsigned char *begin,*end,*tmp; sz = getpagesize(); size= (size / sz)*sz; sh_key = shmget (IPC_PRIVATE, size, IPC_CREAT | IPC_EXCL | SHM_R | SHM_W); if (sh_key != -1) { printf(sh_key=%i\n,sh_key); begin = (unsigned char *)shmat (sh_key, NULL, 0); if ( begin != -1) { tmp = begin + size; printf(begin=%d, tmp=%d\n,(int)begin,(int)tmp); end = (unsigned char *) shmat(sh_key,tmp,SHM_RND); if (tmp == end ) { printf(end=%i\n,(int)end); shmdt(end); } else { printf(error in shmat : %s\n,strerror(errno)); } shmdt(begin); } else { printf(error in shmat : %s\n,strerror(errno)); } shmctl (sh_key, IPC_RMID, NULL); } else { printf(error in shmget : %s\n,strerror(errno)); } } -- 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: cygserver shmat
Le jeu 12/08/2004 14:03, bertrand marquis a crit : Le jeu 12/08/2004 12:44, Corinna Vinschen a crit : On Aug 12 12:13, bertrand marquis wrote: In fact i wasn't using the SHM_RNd flag. In details here is what i do: - get a shared segment of with size= SIZE (SIZE multiple of SHMLBA) - attach the segment without specifying address and storing the result in beginaddress - attach the segment again specifying the address: endposition= beginaddress + SIZE without SHM_RND in the second shmat i've got the error : invalid argument now that i specifie SHM_RND in the flag i have the error: value to large for defined type any idea ? Nope. Not without knowing the actual values. An strace output of the affected calls would be good. Even better, create a simple testcase which allows to reproduce the behaviour. Just the minimum of necessary code. Corinna Ok, i have made a minimum program showing the problem. You can try specifying or not SHM_RND in the second shmat, without i have INvalid argument error and with i have value too large for defined data type. thanks bertrand __ Hello Running some tests it seems that specifying an adress is not the problem because if i give an adress in the first shmat it is running well as long as this adress is free. In fact the problem is only when specifying an adress for mapping the same segment twice and only if we specifie the adress the second time. i hope it could help or give an idea to someone. bertrand -- 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: cygserver shmat
Le jeu 12/08/2004 14:19, bertrand marquis a crit : Le jeu 12/08/2004 14:03, bertrand marquis a crit : Le jeu 12/08/2004 12:44, Corinna Vinschen a crit : On Aug 12 12:13, bertrand marquis wrote: In fact i wasn't using the SHM_RNd flag. In details here is what i do: - get a shared segment of with size= SIZE (SIZE multiple of SHMLBA) - attach the segment without specifying address and storing the result in beginaddress - attach the segment again specifying the address: endposition= beginaddress + SIZE without SHM_RND in the second shmat i've got the error : invalid argument now that i specifie SHM_RND in the flag i have the error: value to large for defined type any idea ? Nope. Not without knowing the actual values. An strace output of the affected calls would be good. Even better, create a simple testcase which allows to reproduce the behaviour. Just the minimum of necessary code. Corinna Ok, i have made a minimum program showing the problem. You can try specifying or not SHM_RND in the second shmat, without i have INvalid argument error and with i have value too large for defined data type. thanks bertrand __ Hello Running some tests it seems that specifying an adress is not the problem because if i give an adress in the first shmat it is running well as long as this adress is free. In fact the problem is only when specifying an adress for mapping the same segment twice and only if we specifie the adress the second time. i hope it could help or give an idea to someone. bertrand -- 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/ Hello an other time, Ok i perhaps find a solution or a beginning of solution: the getpagesize() function return a value of 4096 for the page size and it seems that shmat need the address to be aligned on a multiple of SHMLBA (655539), if instead of using getpagesize value to round the size i use the value of SHMLBA i can run the test program without any problem. the thing is that this doesn't append under linux. In fact under linux SHMLBA=getpagesize=4096 so the program run perfectly without any problem. Perhaps the cygwin release of getpagesize should output also SHMLBA ? bertrand -- 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/
cygserver cleanup thread
Hello, i'm making a program using shared memory and as a consequence i need to use the cygserver. But when i close my program the ipcs give me this output: $ ipcs -ma Shared Memory: T ID KEYMODE OWNERGROUP CREATOR CGROUP NATTCH SEGSZ CPID LPIDATIMEDTIMECTIME m 2621440 --rw--- bma Kein bma Kein 0 2056192 1280 1988 10:07:25 10:07:46 10:07:13 m 2621450 --rw--- bma Kein bma Kein 0 6320 1280 1268 10:07:13 10:07:46 10:07:13 m 2621460 --rw--- bma Kein bma Kein 0 2056192 1280 1268 10:07:13 10:07:46 10:07:13 m 2621470 --rw--- bma Kein bma Kein 0 6320 1280 1268 10:07:13 10:07:46 10:07:13 m 2621480 --rw--- bma Kein bma Kein 0 1794048 1280 1268 10:07:13 10:07:46 10:07:13 m 2621490 --rw--- bma Kein bma Kein 0 6320 1280 2060 10:07:19 10:07:46 10:07:19 m 2621500 --rw--- bma Kein bma Kein 0 2056192 1280 2060 10:07:19 10:07:46 10:07:19 m 2621510 --rw--- bma Kein bma Kein 0 6320 1280 1988 10:07:25 10:07:46 10:07:24 m 3276880 --rw--- bma Kein bma Kein 0 2056192 1280 1988 10:07:25 10:07:46 10:07:24 m 3276890 --rw--- bma Kein bma Kein 0 6320 1280 1988 10:07:25 10:07:46 10:07:25 m 2621540 --rw--- bma Kein bma Kein 0 2056192 1280 1988 10:07:25 10:07:46 10:07:25 m 2621550 --rw--- bma Kein bma Kein 0 6320 1280 1988 10:07:25 10:07:46 10:07:25 m 2621560 --rw--- bma Kein bma Kein 0 2056192 1280 1988 10:07:25 10:07:46 10:07:25 m 1966360 --rw--- bma Kein bma Kein 0 6320 1280 1988 10:07:25 10:07:46 10:07:13 In fact all the shared memory i used is still there and is used by nobody (NNATCH 0). I thought that the cleanup thread of the cygserver was supposed to clean those but i have to remove them myself. Is this a normal behavior ? Is there something to configure in cygserver to clean those ? i'm using the default configuration file produced by the cygserver config script and the output of my cygcheck is enclosed to this mail thanks bertrand Cygwin Configuration Diagnostics Current System Time: Wed Aug 11 10:13:23 2004 Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 3 Path: C:\elinos\usr\local\bin C:\elinos\bin C:\elinos\bin C:\elinos\usr\X11R6\bin c:\WINNT\system32 c:\WINNT c:\WINNT\System32\Wbem C:\elinos\bin Output from C:\elinos\bin\id.exe (nontsec) UID: 1000(bma) GID: 513(Kein) 513(Kein) Output from C:\elinos\bin\id.exe (ntsec) UID: 1000(bma) GID: 513(Kein) 0(root) 513(Kein) 544(Administratoren) 545(Benutzer) SysDir: C:\WINNT\System32 WinDir: C:\WINNT CYGWIN = `server' HOME = `C:\elinos\home\bma' MAKE_MODE = `unix' PWD = `/cygdrive/e/rpm-root/packages/RPMS/noarch' USER = `bma' ALLUSERSPROFILE = `C:\Dokumente und Einstellungen\All Users' COMMONPROGRAMFILES = `C:\Programme\Gemeinsame Dateien' COMPUTERNAME = `BMA-TEST2' COMSPEC = `C:\WINNT\system32\cmd.exe' CVS_RSH = `/bin/ssh' DISPLAY = `bma.sysgo.com:0.0' HOMEDRIVE = `C:' HOMEPATH = `\elinos\home\bma' HOSTNAME = `bma-test2' INFOPATH = `/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr/autotool/stable/info:' LOGONSERVER = `\\BMA-TEST2' MANPATH = `/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man::/usr/ssl/man' NUMBER_OF_PROCESSORS = `1' OLDPWD = `/home/bma' OS2LIBPATH = `C:\WINNT\system32\os2\dll;' OS = `Windows_NT' PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH' PKG_CONFIG_PATH = `/usr/X11R6/lib/pkgconfig' PROCESSOR_ARCHITECTURE = `x86' PROCESSOR_IDENTIFIER = `x86 Family 6 Model 4 Stepping 2, AuthenticAMD' PROCESSOR_LEVEL = `6' PROCESSOR_REVISION = `0402' PROGRAMFILES = `C:\Programme' PS1 = `\[\033]0;\w\007 [EMAIL PROTECTED] \[\033[33m\w\033[0m\] $ ' REMOTE_HOST = `172.22.28.10' SHELL = `/bin/bash' SHLVL = `1' SYSTEMDRIVE = `C:' SYSTEMROOT = `C:\WINNT' TEMP = `c:\WINNT\TEMP' TERM = `xterm' TMP = `c:\WINNT\TEMP' USERDOMAIN = `BMA-TEST2' USERNAME = `bma' WINDIR = `C:\WINNT' XAUTHORITY = `/home/bma/.Xauthority' _ = `/usr/bin/cygcheck' POSIXLY_CORRECT = `1' HKEY_CURRENT_USER\Software\Cygnus Solutions HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
Re: cygserver cleanup thread
Le mer 11/08/2004 10:50, Corinna Vinschen a crit : On Aug 11 10:13, bertrand marquis wrote: Hello, i'm making a program using shared memory and as a consequence i need to use the cygserver. But when i close my program the ipcs give me this output: $ ipcs -ma Shared Memory: T ID KEYMODE OWNERGROUP CREATOR CGROUP NATTCH SEGSZ CPID LPIDATIMEDTIMECTIME m 2621440 --rw--- bma Kein bma [...] In fact all the shared memory i used is still there and is used by nobody (NNATCH 0). I thought that the cleanup thread of the cygserver was supposed to clean those but i have to remove them myself. Is this a normal behavior ? Is there something to configure in cygserver to clean those ? This is normal behaviour. SYSV IPC is designed to keep the IPC elements intact even if no process is accessing them. If you want to get rid of them, then you have to do this by using the appropriate IPC_RMID control call: msgctl (msgid, IPC_RMID, NULL); semctl (semid, 0, IPC_RMID); shmctl (shmid, IPC_RMID, NULL); Thank you, i will try to find a way to call shmctl from the last thread running. If you're creating an application which needs shared memory only on runtime, which should disappear when the last application using it exits, consider to use simple mmap calls. It's way easier than having to run cygserver. Corinna -- 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/
cygwin setup local install
Hello, i need to run the cygwin setup with the quiet option using the local-install option but the setup is always loking for the packages in the directory where cygwin packages have first been stored is there an option to specifie where is the local packages directory ? thanks
rebuild rpm-4.1 from sources
Hello i need to recompile rpm-4.1 from sources but when it is trying to compile in db3/lock i have : cc -c -I. -I../db/dist/../include -I../db/dist/../include_auto -O2 -g -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts ../db/dist/../lock/lock_r egion.c -DDLL_EXPORT -DPIC -o .libs/lock_region.lo ../db/lock/lock_region.c:98:49: macro __lock_init passed 2 arguments, but takes just 1 ../db/lock/lock_region.c: In function `__lock_open_rpmdb': ../db/lock/lock_region.c:98: warning: assignment makes integer from pointer without a cast ../db/lock/lock_region.c:150:22: macro __lock_init passed 2 arguments, but takes just 1 ../db/lock/lock_region.c: At top level: ../db/lock/lock_region.c:151: error: syntax error before DB_ENV ../db/lock/lock_region.c:153: error: syntax error before '{' token ../db/lock/lock_region.c:166: error: syntax error before if ../db/lock/lock_region.c:170: warning: type defaults to `int' in declaration of `region' ../db/lock/lock_region.c:170: error: conflicting types for `region' ../db/lock/lock_region.c:158: error: previous declaration of `region' ../db/lock/lock_region.c:170: warning: data definition has no type or storage class ../db/lock/lock_region.c:171: error: syntax error before numeric constant ../db/lock/lock_region.c:177: warning: type defaults to `int' in declaration of `lk_conflicts' ../db/lock/lock_region.c:177: warning: initialization makes integer from pointer without a cast ../db/lock/lock_region.c:177: warning: data definition has no type or storage class ../db/lock/lock_region.c:178: error: syntax error before '}' token ../db/lock/lock_region.c:180: warning: type defaults to `int' in declaration of `lk_conflicts' ../db/lock/lock_region.c:180: error: redefinition of `lk_conflicts' ../db/lock/lock_region.c:177: error: `lk_conflicts' previously defined here ../db/lock/lock_region.c:180: warning: initialization makes integer from pointer without a cast ../db/lock/lock_region.c:180: warning: data definition has no type or storage class ../db/lock/lock_region.c:181: error: syntax error before '}' token ../db/lock/lock_region.c:184: warning: type defaults to `int' in declaration of `lk_conflicts' ../db/lock/lock_region.c:184: error: redefinition of `lk_conflicts' ../db/lock/lock_region.c:180: error: `lk_conflicts' previously defined here ../db/lock/lock_region.c:184: warning: initialization makes integer from pointer without a cast ../db/lock/lock_region.c:184: error: initializer element is not constant ../db/lock/lock_region.c:184: warning: data definition has no type or storage class ../db/lock/lock_region.c:185: error: syntax error before '}' token ../db/lock/lock_region.c:199: error: syntax error before '' token ../db/lock/lock_region.c:205: error: syntax error before '*' token ../db/lock/lock_region.c:205: warning: type defaults to `int' in declaration of `memcpy' ../db/lock/lock_region.c:205: warning: function declaration isn't a prototype ../db/lock/lock_region.c:205: warning: data definition has no type or storage class ../db/lock/lock_region.c:206: error: syntax error before '-' token ../db/lock/lock_region.c:212: error: syntax error before '-' token ../db/lock/lock_region.c:212: warning: type defaults to `int' in declaration of `__db_hashinit_rpmdb' ../db/lock/lock_region.c:212: warning: function declaration isn't a prototype ../db/lock/lock_region.c:212: error: conflicting types for `__db_hashinit_rpmdb' env_ext.h:22: error: previous declaration of `__db_hashinit_rpmdb' ../db/lock/lock_region.c:212: warning: data definition has no type or storage class ../db/lock/lock_region.c:213: error: syntax error before '-' token ../db/lock/lock_region.c:219: error: syntax error before '-' token ../db/lock/lock_region.c:219: warning: type defaults to `int' in declaration of `__db_hashinit_rpmdb' ../db/lock/lock_region.c:219: warning: function declaration isn't a prototype ../db/lock/lock_region.c:219: warning: data definition has no type or storage class ../db/lock/lock_region.c:220: error: syntax error before '-' token ../db/lock/lock_region.c:250: error: syntax error before struct ../db/lock/lock_region.c:250: error: syntax error before '-' token ../db/lock/lock_region.c:261: error: syntax error before struct ../db/lock/lock_region.c:261: error: syntax error before '-' token ../db/lock/lock_region.c:275: error: syntax error before struct ../db/lock/lock_region.c:275: error: syntax error before '-' token ../db/lock/lock_region.c:24: warning: `__lock_init' used but never defined make[2]: *** [lock_region.lo] Error 1 make[2]: Leaving directory `/usr/src/rpm-4.1/db3' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/rpm-4.1' make: *** [all] Error 2 i could build it from sources with release of one month ago but i have updated since and now i can't recompile it anymore. Does anyone konw why i have this error ? i have joined my cygcheck -s thanks Cygwin
Re: ncurses not found when compiling various packages
you should ckeck if there is links between ncurses and curses files. ex: curses.h - ncurses.h etc if not you should reinstall libncurses bertrand Thorsten Kampe a écrit: Hi, I often get the message from configure scripts for applications that are curses-based that no ncurses could be found (although it actually is installed[1] and many applications happily use it) What's going wrong and how can I point the configure script to my ncurses dlls? Any environment variable or something like that? Thorsten [1] cygcheck -c libncurses5 5.2-1 OK libncurses6 5.2-8 OK libncurses7 5.3-4 OK ncurses 5.3-4 OK ncurses-demo 5.3-4 OK -- 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/ -- 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/
gcc-mingw
hello on the latest release it seems that there is a problem with gcc-mingw in fact the src package and the package contains nothing c616cffee0f344c37fd4e045a7a87054 gcc-mingw-20030911-4-src.tar.bz2 c616cffee0f344c37fd4e045a7a87054 gcc-mingw-20030911-4.tar.bz2 i'm using the ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/ mirror and this two packages are empty but the 20030911-3 packages are ok thanks -- 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: Can i build Kernel Modules using cygwin and test them
Saurabh Agarwal a écrit: On Thu, 1 Jul 2004 13:42:30 +0530, Saurabh Agarwal [EMAIL PROTECTED] wrote: On Thu, 1 Jul 2004 13:02:39 +0530, Saurabh Agarwal [EMAIL PROTECTED] wrote: Hi All, I want to write Kernel Modules and test them using cygwin as most of time i have windows machine. Can i make kernel modules in cygwin and test the. I tried it but Module.h, kernel.h were not present in cygwin. Please Help - Saurabh Agarwal -- Saurabh Agarwal 9868358071 Yes it is possible to build kernel module under cygwin but you have to use a cross compiler and you will also need to have the kernel sources you can use the crosstool to do that: http://kegel.com/crosstool/ Bertrand -- 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/
sunrpc librairie
Hello, i'm trying to port a program using rpc calls to cygwin. But when i compiled using the headers from the sunrpc package i discovered that in clnt.h all the arguments of functions are in commentary: /* * Print why creation failed */ void clnt_pcreateerror(/* char *msg */);/* stderr */ char *clnt_spcreateerror(/* char *msg */);/* string */ /* * Like clnt_perror(), but is more verbose in its output */ void clnt_perrno(/* enum clnt_stat num */);/* stderr */ /* * Print an English error message, given the client error code */ void clnt_perror(/* CLIENT *clnt, char *msg */); /* stderr */ char *clnt_sperror(/* CLIENT *clnt, char *msg */);/* string */ can someone can explain me why or if i need to use an other librarie under cygwin to do that kind of thing thanks -- 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/
compiling glib-2.2.3
Hello i'm trying to build glib-2.2.3. I have downloaded the patch from cygnome2.sourceforge.net. I have configured it like this: ./configure --host=i686-pc-cygwin \ --prefix=/opt/elinos/cygwin/i686-pc-cygwin \ --sysconfdir=/etc \ --with-gnu-ld \ --with-libicon=native \ --disable-included-printf \ --with-threads=no \ --enable-debug=no and then it is compiling glib and gobject but when linking for gobject-query.exe i have this: i686-pc-cygwin-gcc -g -O2 -Wall -o gobject-query.exe gobject-query.o ./.libs/libgobject-2.0.a /home/bma/rpm-root/packages/BUIL D/glib-2.2.3/glib/.libs/libglib-2.0.a ../glib/.libs/libglib-2.0.a -liconv -luser32 -lkernel32 -lintl ./.libs/libgobject-2.0.a(gparam.o)(.text+0xb14): In function `g_param_spec_pool_insert': /home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:618: undefined reference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xb71):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:632: undefined re ference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xb99):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:641: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xbd3):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:624: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xc3b): In function `g_param_spec_pool_remove': /home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:649: undefined reference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xc61):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:654: undefined re ference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xc81):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:661: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xcc1):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:653: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xcda): In function `g_param_spec_pool_lookup': /home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:727: undefined reference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xd17):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:771: undefined re ference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xd3c):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:774: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xde2):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:764: undefined re ference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xdff):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:766: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xe63):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:735: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xeba): In function `g_param_spec_pool_list_owned': /home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:798: undefined reference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xeef):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:802: undefined re ference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xf0f):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:805: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xf24):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:805: undefined re ference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0xfca): In function `g_param_spec_pool_list': /home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:874: undefined reference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0x1101):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:895: undefined r eference to `__imp__g_threads_got_initialized' ./.libs/libgobject-2.0.a(gparam.o)(.text+0x1124):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:898: undefined r eference to `__imp__g_thread_functions_for_glib_use' ./.libs/libgobject-2.0.a(gparam.o)(.text+0x11b2):/home/bma/rpm-root/packages/BUILD/glib-2.2.3/gobject/gparam.c:833: undefined r eference to `__imp__g_thread_functions_for_glib_use' collect2: ld returned 1 exit status Does anyone has an idea because i can't find a solution thanks -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports:
problem with make under cygwin
Hello i'm having a strange problem with the make command and shell. i try to run a makefile with this : HAVE_DEVFS := $(shell grep 'CONFIG_DEVFS_FS=y' ../../linux/.config /dev/null echo yes || echo no) the shell command is working out of a makefile but in the makefile the HAVE_DEVFS variable only contain the output of the grep command. Does anyone know why it doesn't work ? I'm using make 3.80-1 on windows 2000 thanks -- 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: problem with make under cygwin
thanks i found also that passing -n to echo solve the problem : HAVE_DEVFS := $(shell grep 'CONFIG_DEVFS_FS=y' ../../linux/.config /dev/null echo -n yes || echo -n no) but thank you, your solution is so much better Christopher Faylor a écrit: On Tue, Jun 01, 2004 at 10:00:21AM +0200, bertrand marquis wrote: Hello i'm having a strange problem with the make command and shell. i try to run a makefile with this : HAVE_DEVFS := $(shell grep 'CONFIG_DEVFS_FS=y' ../../linux/.config /dev/null echo yes || echo no) the shell command is working out of a makefile but in the makefile the HAVE_DEVFS variable only contain the output of the grep command. Does anyone know why it doesn't work ? make uses /bin/sh. /bin/sh doesn't understand the construct. It is not portable. Use HAVE_DEVFS := $(shell grep 'CONFIG_DEVFS_FS=y' ../../linux/.config /dev/null 21 echo yes || echo no) instead. 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/ -- 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/
problem with cygwin crypt function
Hello i need to use the cygwin crypt function to compare the result with the result of the linux string function. Under linux i crypt the string with a salt and then i have to remove the first characters to remove the salt from the result string. But under cygwin it seems that i only have a 13 char string with no salt at the beginning and this result string is completely different from the linux result string with the same input. Does anyone know a way to solve that -- 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: How To Export NFS?
Hello i think that's not the good way to run portmap nfsd and mountd directly you should install them as windows services. there is a script with cygwin called nfs-server-config which will configure that for you: install the services and generate default config files, you will then be able to add what you want to /etc/exports and then restart the services with thoses commands: to stop the services: cygrunsrv -E portmap cygrunsrv -E mountd cygrunsrv -E nfsd to start the services: cygrunsrv -S portmap cygrunsrv -S mountd cygrunsrv -S nfsd then i think it would have more chance to work Jack Polimer a écrit: Begin Disclaimer: The following searches produced nothing useful... Searched http://cygwin.com/faq.html for nfs Searched http://cygwin.com/ for nfs Googled web and groups for cygwin nfs End Disclaimer I'm trying to export an NFS filesystem under cygwin to a Linux machine on the same network, but I get # mount -t nfs 10.0.0.1:/etc /mnt mount: RPC: Timed out There are no firewalls on either box. My /etc/exports contains: $ cat /etc/exports /etc 10.0.0.0/255.255.255.0(ro) I ran the following on the cygwin machine: $ /usr/sbin/portmap.exe $ /usr/sbin/rpc.mountd.exe $ /usr/sbin/rpc.nfsd.exe I can't find any reference to make this work. If anyone can forward something helpful, I would greatly appreciate it. If this is a FAQ, please point me in the right directions because I can't find it... As always, please send negative comments to /dev/null :) . Thanks! __ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861 -- 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/ -- 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/
libiberty and getopt
Hi, I need to compile a program using libiberty.a and the function getopt_long. When compiling with the flag -liberty my program crash because it don't take the right arguments from the command line. But without libiberty this part work before. i made a small program showing that problem, if anyone has an idea ? i'm using the latest cygwin from the installer ,gcc-3.3.1 and ld 2.15.90 20040312 thanks You can find next my source code for the test program and the result i have with it. My test program: /*begin of argu.c*/ #include unistd.h #include getopt.h #include ctype.h #include stdio.h int main(int argc, char **argv) { struct option long_opts[] = { {v, 1, 0, 'v'}, {no-v, 0, 0, 'V'}, {k, 1, 0, 'k'}, {no-k, 0, 0, 'K'}, {l, 1, 0, 'l'}, {no-l, 0, 0, 'L'}, {0, 0, 0, 0} }; int c; while ((c = getopt_long(argc, argv, v:Vk:Kl:L:, long_opts, NULL)) != EOF) { switch(c) { case 'v': printf(v %s\n,optarg); break; case 'V': printf(V\n); break; case 'k': printf(k %s\n,optarg); break; case 'K': printf(K\n); break; case 'l': printf(l %s\n,optarg); break; case 'L': printf(L\n); break; case '?': printf(other:%c\n,c); } } printf(argc=%d , optind=%d , file=%s\n,argc,optind,argcoptind?*(argv+optind):none); return 0; } /*end of argu.c*/ when you compile it with : gcc argu.c -o argu.exe it works: $ ./argu.exe -v abc -K test v abc K argc=5 , optind=4 , file=test but when you compile it with gcc argu.c -o argu.exe -liberty it gives: $ ./argu.exe -v abc -K test v (null) K argc=5 , optind=1 , file=-v -- 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: libiberty and getopt
Hi again, i just find the solution to my problem in fact it seems that adding: extern int optind; extern char *optarg; solve the problem. The compiler then auto-import these variables and it is working after. This problem doesn't seem to exist under linux but it could be a difference in versions between my linux and my cygwin. bertrand marquis a écrit: Hi, I need to compile a program using libiberty.a and the function getopt_long. When compiling with the flag -liberty my program crash because it don't take the right arguments from the command line. But without libiberty this part work before. i made a small program showing that problem, if anyone has an idea ? i'm using the latest cygwin from the installer ,gcc-3.3.1 and ld 2.15.90 20040312 thanks You can find next my source code for the test program and the result i have with it. My test program: /*begin of argu.c*/ #include unistd.h #include getopt.h #include ctype.h #include stdio.h int main(int argc, char **argv) { struct option long_opts[] = { {v, 1, 0, 'v'}, {no-v, 0, 0, 'V'}, {k, 1, 0, 'k'}, {no-k, 0, 0, 'K'}, {l, 1, 0, 'l'}, {no-l, 0, 0, 'L'}, {0, 0, 0, 0} }; int c; while ((c = getopt_long(argc, argv, v:Vk:Kl:L:, long_opts, NULL)) != EOF) { switch(c) { case 'v': printf(v %s\n,optarg); break; case 'V': printf(V\n); break; case 'k': printf(k %s\n,optarg); break; case 'K': printf(K\n); break; case 'l': printf(l %s\n,optarg); break; case 'L': printf(L\n); break; case '?': printf(other:%c\n,c); } } printf(argc=%d , optind=%d , file=%s\n,argc,optind,argcoptind?*(argv+optind):none); return 0; } /*end of argu.c*/ when you compile it with : gcc argu.c -o argu.exe it works: $ ./argu.exe -v abc -K test v abc K argc=5 , optind=4 , file=test but when you compile it with gcc argu.c -o argu.exe -liberty it gives: $ ./argu.exe -v abc -K test v (null) K argc=5 , optind=1 , file=-v -- 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/ -- 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: stat()/lstat() problem (?)
ZXPLESPAC001, Ext a écrit: Hi, here is my question/problem (see the example program below): -// #include stdio.h #include sys/types.h #include sys/stat.h #include errno.h static int is_dir(char * dr) { struct stat st; if(stat(dr, st) == -1) { perror(stat); return -1; } if(lstat(dr, st) == -1) { perror(lstat); return -1; } } int main(int argc,char **argv) { int rc; rc=is_dir(//bin); rc=is_dir(/bin); } -// With my version of cygwin(Windows NT Ver 4.0 Build 1381 Service Pack 6 - cygwin 1.5.9-1) the first call to is_dir() produces an error(stat: No such file or directory) BUT the same code was compiled and run on Linux (RH9) and Sun (Solaris2.8) and produces no errors !! The question is: - is the behavior on Linux/Solaris normal ? I fact there ain't a '//bin' only a '/bin', but even all the shells treat them as representing the same path (BTW 'cd //bin' on cygwin/bash doesn't work ...) this is a normal error under cygwin, you should look at the FAQ: // refers to network places - is it an error in cygwin ? Did all pathes (oops is my english very clear ?) have to treat dupplicated '/' as single '/' ? Is the notion of a pathname normalized somewhere (maybe posix ?) ? you should remove all // under cygwin to avoid those errors see: http://cygwin.com/faq/faq_toc.html#TOC34 - CE COURRIER ELECTRONIQUE EST A USAGE STRICTEMENT INFORMATIF ET NE SAURAIT ENGAGER DE QUELQUE MANIERE QUE CE SOIT EADS ASTRIUM SAS, NI SES FILIALES. SI UNE ERREUR DE TRANSMISSION OU UNE ADRESSE ERRONEE A MAL DIRIGE CE COURRIER, MERCI D'EN INFORMER L'EXPEDITEUR EN LUI FAISANT UNE REPONSE PAR COURRIER ELECTRONIQUE DES RECEPTION. SI VOUS N'ETES PAS LE DESTINATAIRE DE CE COURRIER, VOUS NE DEVEZ PAS L'UTILISER, LE CONSERVER, EN FAIRE ETAT, LE DISTRIBUER, LE COPIER, L'IMPRIMER OU EN REVELER LE CONTENU A UNE TIERCE PARTIE. This email is for information only and will not bind EADS Astrium SAS in any contract or obligation, nor its subsidiaries. If you have received it in error, please notify the sender by return email. If you are not the addressee of this email, you must not use, keep, disseminate, copy, print or otherwise deal with it. - -- 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/ -- 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: cygrunsrv
no you are not wrong it is the same for me under win2k and it is working i think that cygrunsrv is the one who call the right program Christopher Benson-Manica a écrit: When I try to install services using cygrunsrv, the XP service manager always lists the path to the executable as cygrunsrv rather than the executable I tried to install. What might I be doing wrong? Thanks... -- 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: stty under cygwin
Christopher Faylor a écrit: On Thu, Apr 22, 2004 at 09:10:46AM +0200, bertrand marquis wrote: First of all stty 1:0:cbd:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 /dev/ttyS0 is a regular linux command, you can try. In fact i'm trying to porting some stuff from linux to cygwin and it seem that the stty under cygwin doesn't accept to have settings in input. To repeat what I said in a previous message, Cygwin's stty does accept this kind of input. You can't generate the string on linux and use it on Cygwin, however. cgf In fact you are right cygwin stty accept this kind of input but it seems that the 1:..:0 has to be be shorter under cygwin and after i can at least do the stty command but the input don't seem to work: $ stty 1:0:1cb2:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0 /dev/ttyS0 stty: standard input: unable to perform all requested operations i will have to find an other way to do that -- 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/
stty under cygwin
i need to use stty to send commands through the serial port under cygwin: stty 1:0:cbd:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 /dev/ttyS0 but stty answer me that 1:...:0 is a wrong argument ? I'm using the last version of cygwin and the serial port is working anyone has an idea ? -- 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/
need loadkeys --mktable under cygwin
Hello i.m trying to build the kernel under cygwin with a cross compiler (host=cygwin target=i386-linux) and it seems that the kernel need the loadkeys program to be build. I have tried to find it but it seems that it don't exist. Does anyone know a solution for that problem ? thanks -- 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: need loadkeys --mktable under cygwin
I found a solution i downloaded kbd-0.99 it doesn't compile under cygwin but if you take the files: loadkeys.y ksyms.c findfile.c getfd.c than you take kd.h wait.h and keyboard.h from a linux kernel and you can compile a simple loadkeys for cygwin to use to compile a kernel. i made this with those commands (i.m using a cross compiler): bison -y loadkeys.y mv -f y.tab.c loadkeys.c flex -8 -t analyze.l analyze.c i686-pc-cygwin-gcc -c -O2 -DDATADIR=\/usr/share/kbd\ loadkeys.c i686-pc-cygwin-gcc -c -Wall -O2 -DDATADIR=\/usr/share/kbd\ ksyms.c i686-pc-cygwin-gcc -c -Wall -O2 -DDATADIR=\/usr/share/kbd\ findfile.c i686-pc-cygwin-gcc -c -Wall -O2 -DDATADIR=\/usr/share/kbd\ getfd.c i686-pc-cygwin-gcc -s loadkeys.o ksyms.o findfile.o getfd.o -o loadkeys Igor Pechtchanski a écrit: On Tue, 30 Mar 2004, bertrand marquis wrote: Hello i.m trying to build the kernel under cygwin with a cross compiler (host=cygwin target=i386-linux) and it seems that the kernel need the loadkeys program to be build. I have tried to find it but it seems that it don't exist. Does anyone know a solution for that problem ? thanks Yep. It's called porting. :-) Seriously, though, looking at the man page for loadkeys, it doesn't seem too relevant for Cygwin. In particular, the entry for --mktable says: CREATE KERNEL SOURCE TABLE If the -m (or --mktable ) option is given loadkeys prints to the standard output a file that may be used as /usr/src/linux/drivers/char/defkeymap.c, specifying the default key bindings for a kernel (and does not modify the current keymap). Sounds like the kernel is not very cross-compilation friendly (i.e., it's expected to be compiled *on a Linux machine*). One solution is to create a loadkeys script that accepts only one option (--mktable) and prints out pre-defined text... Alternatively, contact the authors of the code and notify them that their code doesn't build on Cygwin (and probably won't on OpenBSD, either). Igor -- 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/
porting gcc-3.2.3 to cygwin
For a project i need to use gcc-3.2.3 under cygwin and also as a cross compiler to make cygwin programs on a linux computer but it seems that when i'm compiling stuff with this gcc, there are problem accessing the file system under cygwin. for example if i stat a directory and check if it is a directory, i get a negative answer, but the program as been compiled without any problem. Is anyone know what patch is needed to make this version of gcc work under cygwin ? thanks in advance -- 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/