X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; q=dns; s=default; b=tL5Tz/r 4CN6Zk+M71F0GxGwNfYoxkOaI4/cMunPz84ur3w75qV7qFlOYrEhj0n8uW+XtFIQ lzmLA78HPla9E+y+S1j1xPRmVpbh3Pm4GNxlchm2vK7D69gHkYPTU2OtSzn6r9Nm 1tcAVvZtSBcPe62wuDoa9UoSV/1MpnbK/cBQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=default; bh=ISHxr3MmnfmwQ e1G3qrZC5NAuJI=; b=q7y6675BDeu5bNciY2unehKudBzMasGqaHbNwMPLYIkRf CiJrjDPI342hkvRdTuPjiaENNdPzK04zQOsHimQ7hEgjmr/cX4N54VZF3JWEaWVD iy4h/mHIHeRhNbTgF2eQFf7Gy7BaPRv12+3WrwLERWhLDrzAuThNlA9Pk0A2NA= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Clients, *we, Kill X-HELO: mail-lf0-f42.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=tUkD8nveK9MIUQKzKMw3cwhWUOMN9FBxWSFCthC82ek=; b=CFsJA/VKlLvUizGFb8vxifv/HeedjWiLShsVHYKN21Al5BoRoPGDXkCKj00Iw5f1Lh TwpJ97cFV3avUTwKRKxwH0PvI4dpLm78adwLyK2+klad3NtN1O38Pcg8TYIjm1IGhXP4 fx3Sg+Td7+Cfireqe4lsnyiwDC1z6rSu3SdEaYyyNv055uN010zvlqgZrPUVkfc/vc/a 2wLMNMY+I9h7Z9L0g+/IeiZwJr//5UWvgWGiaNw2rNGfJ1OuqiL/M9fhCaGwrjrkVXZx n8WexKRbJUYUpIBj8lG+TR963znJuP1Ekh+NFasGWEIM2so4skd8dPy3+kbOBXbaOWA0 3bDg== X-Gm-Message-State: AIkVDXJgG+sU+Sukc6FVLfXjOy+h/BofUA+9EeBa6CWsz+/TczCDaL2U+mAOAPvU1GvFTxZg9X9OwfQBgK/8UA== X-Received: by 10.25.25.204 with SMTP id 195mr26420938lfz.84.1483671463101; Thu, 05 Jan 2017 18:57:43 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Rashi Singhal Date: Fri, 6 Jan 2017 08:27:42 +0530 Message-ID: Subject: Re: Cygwin 2.6.0 Fork issue To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Hi , Thanks again for reply.Please find my response.: You're saying that on this same computer, running Win 2012, this sample code ran properly under a previous version of Cygwin? Which version was that? Answer: We were using pretty old version 1.7.0-58 Which source have you downloaded? Whose source? Answer: I have downloaded Cygwin 2.26 source I have doubt ,.Is there any compilation variable or cygwin varaible set for autoloading all dll's Not sure why you're asking this. Answer: As all the other dll's (windows native and actian pervasive) are not getting loaded automatically with old version of cygwin(1.7.0-58) so I asked if there any variable which say to autoload the dll's. I know old version is very old to compare the things but I am doing that as I used that as my cygwin version till now. Your sample program is getting exceptions (i.e., is faulting) even before it fork()s the child process. The child is faulting the same way. This looks pretty much like your sample program was built with incorrect assumptions. Answer: Yes I am trying to find why such exceptions has come. are You can try posting the compilation (and linking) command(s) that you used to build your btrsamp.exe program. Maybe there's something obvious there that somebody here can see. We can't help you debug your program though, and you can't mix Windows-native DLLs that use Microsoft C runtime with Cygwin code. Answer: Please find below compilation and linking code linking varaible export CC=gcc export LEX=flex export CYGWIN=server export PLATFORM=NT4 export OS_FLAGS="-Wall -DNT4 -DNW_SUPPORT -DNORELISAM -D_KERNEL -DCYG15" export OS_CIOS= export OS_LIBS="-L/usr/lib -lkernel32 -lcygwin -lmingw32 -L/usr/lib -lkernel32 -L/usr/bin -lgcc -L/usr/local/lib -lcompat -lbtr" export OS_DMS= # OS specific DMS's to be built export LCFLAGS="$OS_FLAGS" # Lex CFLAGS export YCFLAGS="$OS_FLAGS" # Yacc CFLAGS makefile: CC = gcc LDFLAGS = CFLAGS = -I../../intf/c CFLAGS += -DBTI_WIN ----- this is for pervasive---- LDFLAGS += -L$(PVSW_ROOT)/lib SYSLIBS=-lcurses $(OS_LIBS) #EXECS = btrsamp #OBJS = btrsamp.o default: @echo -------------------------------------------------------- @echo PSQL @echo Btrieve samples @echo @echo Type \"make all\" to make all executables. @echo Type \"make clean\" to remove object files. @echo Type \"make cleanall\" to remove all non-source files. @echo -------------------------------------------------------- # all: $(EXECS) all: allbins allbins: @echo "Compiling sample..." @$(CC) $(INCLPATH) btrapi.c -o btrapi btrsamp.c -o btrsamp $(CFLAGS) $(LDFLAGS) $(SYSLIBS) btrsamp: Sample code: ------------ I have put only fork call code------- iStat = fork(); printf("\nCreating Clients using fork method iStat is %d...\n",iStat); if ((iStat) == 0 ) { printf("\n I am in child \n"); rd_proc_wr_request(); printf("\n I am in child exit \n"); --- Program never reaches here exit(0); } /*when the process client finishes Kill the child */ else { /*We are the parent so free the memory*/ sleep(15); printf("start of Main Process \n"); errWaitPid = waitpid( iStat, &wstatus, WNOHANG | WUNTRACED | WCONTINUED ); printf( "errWaitPid = %d, errno = %d, comment = %s\n", errWaitPid, errno, strerror( errno ) ); printf ("Parent reads <%s>\n",shm) ; printf("Exiting Main Process\n"); exit(0); } ------------This child process------------ static void* rd_proc_wr_request() { printf("This is child process...\n"); printf("Btrieve before B_OPEN status with BTRV (sample.btr) = %d\n", status); status = BTRV( B_OPEN, posBlock1, dataBuf, &dataLen, keyBuf1, keyNum); printf("Btrieve B_OPEN status (sample.btr) = %d\n", status); ---- Program never reaches here---- I hope I have put relevant information. Sorry if some extra infos are provided. On Thu, Jan 5, 2017 at 9:33 AM, Rashi Singhal wrote: > Hi , > > > Thanks for information provided. > > I tried putting cygwin/ bin path in first place in environment > variables. But result remain same. > > Yes all other DLL's getting loaded are either pervasive dll or windows > native dll. > > I have doubt ,.Is there any compilation variable or cygwin varaible > set for autoloading all dll's > > As in same windows 2012 system this extra DLL's are not getting loaded > with previous versions of cywin and Fork is working there. > > I have downloaded the source also, I check some varibel there if you can help. > > Looks like program just hangs child process after open call and never > comes back. > > Please suggest what I can check . > > > On Tue, Jan 3, 2017 at 2:23 PM, Rashi Singhal wrote: >> Hi, >> >> I am using cygwin 2.6.0 (32 bit) version with Actian Pervasive version 12. >> >> We have a program which will call fork() and in child process Btrieve >> file is getting opened. >> >> While using latest version of cygwin, file open call is not working , >> Its not opening file nor displaying any error. >> >> Could you please help me on this . >> >> I checked all installation also . Still problem exist >> >> Regards, >> Rashi -- 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