Search Results

Search found 2053 results on 83 pages for 'signal'.

Page 8/83 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • PHP getting blank pages after submit a form + signal Segmentation fault (11)

    - by Ole Media
    I few days ago I update my macbook pro to snow leopard, and since then some php files are not showing. This is what happens: I created a php form, when going to 'http://localhost/webform.php' I can see the form just fine. Then, once I submit the form, I just get a blank page. I enable error and warnings reporting under php.ini to make sure I'm not missing something, but still I'm not getting anything, just the blank page. Then I checked under apache log files, and what I notice is that every time I submit the form I see the following line coming up under the apache logs: [Wed Apr 07 21:40:28 2010] [notice] child pid 70223 exit signal Segmentation fault (11) I'm clueless on this one. Any ideas on how to fix it?

    Read the article

  • Qt request never trigger the finished() signal

    - by user63898
    i have something realy strange i have this code : m_url.setUrl("www.cnn.com"); QNetworkRequest request; request.setRawHeader("User-Agent", USER_AGENT.toUtf8()); request.setRawHeader("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7"); request.setRawHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); request.setRawHeader("Accept-Language", "en-us,en;q=0.5"); request.setRawHeader("Connection", "Keep-Alive"); request.setUrl(m_url); reply = qnam.get(request); //QNetworkAccessManager qnam member of the class; connect(reply, SIGNAL(finished()), this, SLOT(httpFinished())); the httpFinished() function that is under private slots: never triggered , why ?

    Read the article

  • Signal "0" error while scrolling a tableview with images

    - by Amitkumar
    Hi, I have a problem while scrolling images on tableview. I am getting a Signal "0" error. I think it is due to some memory issues but I am not able to find out the exact error. The code is as follows, - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [travelSummeryPhotosTable dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]autorelease]; } //Photo ImageView UIImageView *photoTag = [[UIImageView alloc] initWithFrame:CGRectMake(5.0, 5.0, 85.0, 85.0)]; NSString *rowPath =[[imagePathsDictionary valueForKey:[summaryTableViewDataArray objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]; photoTag.image = [UIImage imageWithContentsOfFile:rowPath]; [cell.contentView addSubview:photoTag]; [photoTag release]; // Image Caption UILabel *labelImageCaption = [[UILabel alloc] initWithFrame:CGRectMake(110.0, 15.0, 190.0, 50.0)]; labelImageCaption.textAlignment = UITextAlignmentLeft; NSString *imageCaptionText =[ [imageCaptionsDictionary valueForKey:[summaryTableViewDataArray objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]; labelImageCaption.text = imageCaptionText; [cell.contentView addSubview:labelImageCaption]; [labelImageCaption release]; return cell; } Thanks in advance.

    Read the article

  • iPhone OpenGLES: Textures are consuming too much memory and the program crashes with signal "0"

    - by CustomAppsMan
    I am not sure what the problem is. My app is running fine on the simulator but when I try to run it on the iPhone it crashes during debugging or without debugging with signal "0". I am using the Texture2D.m and OpenGLES2DView.m from the examples provided by Apple. I profiled the app on the iPhone with Instruments using the Memory tracer from the Library and when the app died the final memory consumed was about 60Mb real and 90+Mb virtual. Is there some other problem or is the iPhone just killing the application because it has consumed too much memory? If you need any information please state it and I will try to provide it. I am creating thousands of textures at load time which is why the memory consumption is so high. Really cant do anything about reducing the number of pics being loaded. I was running before on just UIImage but it was giving me really low frame rates. I read on this site that I should use OpenGLES for higher frame rates. Also sub question is there any way not to use UIImage to load the png file and then use the Texture class provided to create the texture for OpenGLES functions to use it for drawing? Is there some function in OpenGLES which will create a texture straight from a png file?

    Read the article

  • receiving signal: EXC_BAD_ACCESS in web service call function

    - by murali
    I'm new to iPhone development. I'm using xcode 4.2. When I click on the save button, I'm getting values from the html page and my web service is processing them, and then I get the error: program received signal: EXC_BAD_ACCESS in my web service call function. Here is my code: NSString *val=[WebviewObj stringByEvaluatingJavaScriptFromString:@"save()"]; NSLog(@"return value:: %@",val); [adict setObject:[NSString stringWithFormat:@"%i",userid5] forKey:@"iUser_Id" ]; [adict setObject:[[val componentsSeparatedByString:@","]objectAtIndex:0] forKey:@"vImage_Url"]; [adict setObject:[[val componentsSeparatedByString:@","]objectAtIndex:1] forKey:@"IGenre_Id"]; [adict setObject:[[val componentsSeparatedByString:@","]objectAtIndex:2] forKey:@"vTrack_Name"]; [adict setObject:[[val componentsSeparatedByString:@","]objectAtIndex:3] forKey:@"vAlbum_Name"]; [adict setObject:[[val componentsSeparatedByString:@","]objectAtIndex:4] forKey:@"vMusic_Url"]; [adict setObject:[[val componentsSeparatedByString:@","]objectAtIndex:5] forKey:@"iTrack_Duration_min"]; [adict setObject:[[val componentsSeparatedByString:@","]objectAtIndex:6] forKey:@"iTrack_Duration_sec"]; [adict setObject:[[val componentsSeparatedByString:@","]objectAtIndex:7] forKey:@"vDescription"]; NSLog(@"dict==%@",[adict description]); NSString *URL2= @"http://184.164.156.55/Music/Track.asmx/AddTrack"; obj=[[UrlController alloc]init]; obj.URL=URL2; obj.InputParameters = adict; [obj WebserviceCall]; obj.delegate= self; //this is my function..it is working for so many function calls -(void)WebserviceCall{ webData = [[NSMutableData alloc] init]; NSMutableURLRequest *urlRequest = [[ NSMutableURLRequest alloc ] initWithURL: [ NSURL URLWithString: URL ] ]; NSString *httpBody = @""; for(id key in InputParameters) { if([httpBody length] == 0){ httpBody=[httpBody stringByAppendingFormat:@"&%@=%@",key,[InputParameters valueForKey:key]]; } else{ httpBody=[httpBody stringByAppendingFormat:@"&%@=%@",key,[InputParameters valueForKey:key]]; } } httpBody = [httpBody stringByAppendingFormat:httpBody];//Here i am getting EXC_BAD_ACCESS [urlRequest setHTTPMethod: @"POST" ]; [urlRequest setHTTPBody:[httpBody dataUsingEncoding:NSUTF8StringEncoding]]; [urlRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self]; } Can any one help me please? thanks in advance

    Read the article

  • Problem with signal handlers being called too many times [closed]

    - by Hristo
    how can something print 3 times when it only goes the printing code twice? I'm coding in C and the code is in a SIGCHLD signal handler I created. void chld_signalHandler() { int pidadf = (int) getpid(); printf("pidafdfaddf: %d\n", pidadf); while (1) { int termChildPID = waitpid(-1, NULL, WNOHANG); if (termChildPID == 0 || termChildPID == -1) { break; } dll_node_t *temp = head; while (temp != NULL) { printf("stuff\n"); if (temp->pid == termChildPID && temp->type == WORK) { printf("inside if\n"); // read memory mapped file b/w WORKER and MAIN // get statistics and write results to pipe char resultString[256]; // printing TIME int i; for (i = 0; i < 24; i++) { sprintf(resultString, "TIME; %d ; %d ; %d ; %s\n",i,1,2,temp->stats->mboxFileName); fwrite(resultString, strlen(resultString), 1, pipeFD); } remove_node(temp); break; } temp = temp->next; } printf("done printing from sigchld \n"); } return; } the output for my MAIN process is this: MAIN PROCESS 16214 created WORKER PROCESS 16220 for file class.sp10.cs241.mbox pidafdfaddf: 16214 stuff stuff inside if done printing from sigchld MAIN PROCESS 16214 created WORKER PROCESS 16221 for file class.sp10.cs225.mbox pidafdfaddf: 16214 stuff stuff inside if done printing from sigchld and the output for the MONITOR process is this: MONITOR: pipe is open for reading MONITOR PIPE: TIME; 0 ; 1 ; 2 ; class.sp10.cs225.mbox MONITOR PIPE: TIME; 0 ; 1 ; 2 ; class.sp10.cs225.mbox MONITOR PIPE: TIME; 0 ; 1 ; 2 ; class.sp10.cs241.mbox MONITOR: end of readpipe ( I've taken out repeating lines so I don't take up so much space ) Thanks, Hristo

    Read the article

  • Problem with signal handlers

    - by Hristo
    how can something print 3 times when it only goes the printing code twice? I'm coding in C and the code is in a SIGCHLD signal handler I created. void chld_signalHandler() { int pidadf = (int) getpid(); printf("pidafdfaddf: %d\n", pidadf); while (1) { int termChildPID = waitpid(-1, NULL, WNOHANG); if (termChildPID == 0 || termChildPID == -1) { break; } dll_node_t *temp = head; while (temp != NULL) { printf("stuff\n"); if (temp->pid == termChildPID && temp->type == WORK) { printf("inside if\n"); // read memory mapped file b/w WORKER and MAIN // get statistics and write results to pipe char resultString[256]; // printing TIME int i; for (i = 0; i < 24; i++) { sprintf(resultString, "TIME; %d ; %d ; %d ; %s\n",i,1,2,temp->stats->mboxFileName); fwrite(resultString, strlen(resultString), 1, pipeFD); } remove_node(temp); break; } temp = temp->next; } printf("done printing from sigchld \n"); } return; } the output for my MAIN process is this: MAIN PROCESS 16214 created WORKER PROCESS 16220 for file class.sp10.cs241.mbox pidafdfaddf: 16214 stuff stuff inside if done printing from sigchld MAIN PROCESS 16214 created WORKER PROCESS 16221 for file class.sp10.cs225.mbox pidafdfaddf: 16214 stuff stuff inside if done printing from sigchld and the output for the MONITOR process is this: MONITOR: pipe is open for reading MONITOR PIPE: TIME; 0 ; 1 ; 2 ; class.sp10.cs225.mbox MONITOR PIPE: TIME; 0 ; 1 ; 2 ; class.sp10.cs225.mbox MONITOR PIPE: TIME; 0 ; 1 ; 2 ; class.sp10.cs241.mbox MONITOR: end of readpipe ( I've taken out repeating lines so I don't take up so much space ) Thanks, Hristo

    Read the article

  • Thread 1: Program received signal:"Sigbart"

    - by user813678
    When i try to run my app on my iPhone, I get " Thread 1: Program received signal:"Sigbart" xCode say that points to [self.navigationController pushViewController:detailViewController animated:YES]; import "RootViewController.h" import "global.h" import "golfbaner.h" @implementation RootViewController @synthesize banenavn; (void)viewDidLoad { [super viewDidLoad]; NSArray *temp = [[NSArray alloc] initWithObjects: @"Alsten Golfklubb", @"Arendal og Omegn Golfklubb", @"Asker Golfklubb", @"Askim Golfklubb", @"Atlungstad Golfklubb", @"Aurskog Golfpark", @"Ballerud Golfklubb", @"Bamble Golfklubb", @"Bergen Golfklubb", @"Bjorli Golfklubb", @"Bjørnefjorden Golfklubb", @"Bjaavann Golfklubb", @"Bodø Golfbane", @"Borre Golfbane", @"Borregaard Golfklubb", @"Brønnøysund Golfklubb", @"Byneset Golfklubb", @"Bærum Golfklubb", @"Drammen Golfklubb", @"Drøbak Golfklubb", @"Egersund Golfklubb", @"Eidskog Golfklubb", @"Eiker Golfklubb", @"Ekholt Golfklubb", @"Elverum Golfklubb", @"Fana Golfklubb", @"Fet Golfklubb", @"Frosta Golfklubb", @"Geilo Golfklubb", @"Giske Golfklubb", @"Gjerdrum Golfpark", @"Gjersjøen Golfklubb", @"Gjøvik og Toten Golfklubb", @"Gran Golfklubb", @"Grenland Golfklubb", @"Grimstad Golfklubb", @"Grini Golfklubb", @"Groruddalen Golfklubb", @"Grønmo Golfklubb", @"Hafjell Golfklubb", @"Haga Golfpark", @"Hakadal Golfklubb", @"Halden Golfklubb", @"Hallingdal Golfklubb", @"Hammerfest og Kvalsund Golfklubb", @"Hardanger Golfklubb", @"Harstad Golfklubb", @"Haugaland Golfklubb", @"Hauger Golf", @"Haugesund Golfklubb", @"Helgeland Golfklubb", @"Hemsedal Golfklubb", @"Herdla Golfklubb", @"Hitra Golfklubb", @"Hof Golfklubb", @"Holtsmark Golfklubb", @"Hovden Golfklubb", @"Hurum Golfklubb", @"Huseby og Hankø Golfklubb", @"Hvaler Golfklubb", @"Hvam Golfklubb", @"Jæren Golfklubb", @"Karasjok Golfklubb", @"Karmøy Golfklubb", @"Kjekstad Golfklubb", @"Klæbu Golfklubb", @"Kongsberg Golfklubb", @"Kongsvinger Golfklubb", @"Kragerø Golfklubb", @"Kristiansand Golfklubb", @"Kristiansund og Omegn Golfklubb", @"Krokhol Golfklubb", @"Kvinesdal og Omegn Golfklubb", @"Kvinnherad Golfklubb", @"Kvitfjell", @"Larvik Golfklubb", @"Lillehammer Golf Park", @"Lillestrøm Golfklubb", @"Lofoten Golf Links", @"Lommedalen Golfklubb", @"Losby Golfklubb", @"Lærdal Golfklubb", @"Lønne Golfklubb", @"Mandal Golfklubb", @"Meland Golfklubb", @"Midt-Troms Golfklubb", @"Miklagard Golfklubb", @"Mjøsen Golfklubb", @"Moa Golfklubb", @"Modum Golfklubb", @"Molde Golfklubb", @"Moss og Rygge Golfklubb", @"Mørk Golfklubb", @"Namdal Golfklubb", @"Namsos Golfklubb", @"Narvik Golfklubb", @"Nes Golfklubb", @"Nittedal Golfklubb", @"Nordfjord Golfklubb", @"Nordvegen Golfklubb", @"Norefjell Golfklubb", @"Norsjø og Omegn Golfklubb", @"North Cape Golf Club", @"Nærøysund Golfklubb", @"Nøtterøy Golfklubb", @"Odda Golfklubb", @"Ogna Golfklubb", @"Onsøy Golfklubb", @"Oppdal Golfklubb", @"Oppegård Golfklubb", @"Oslo Golfklubb", @"Oustøen Country Club", @"Polarsirkelen Golf", @"Preikestolen Golfklubb", @"Randaberg Golfklubb", @"Randsfjorden Golfklubb", @"Rauma Golfklubb", @"Re Golfklubb", @"Ringerike Golfklubb", @"Rygge Flystasjon Golf Club", @"Røros Golfklubb", @"Salten Golfklubb", @"Sandane Golfklubb", @"Sande Golfklubb", @"Sandefjord Golfklubb", @"Sandnes Golfklubb", @"Sauda Golfklubb", @"Selbu Golfklubb", @"Selje Golfklubb", @"Setesdal Golfklubb", @"Skei Golfklubb", @"Ski Golfklubb", @"Skjeberg Golfklubb", @"Smøla Golfklubb", @"Sola Golfklubb", @"Solastranden Golfklubb", @"Solum Golfklubb", @"Soon Golfklubb", @"Sorknes Golfklubb", @"Sotra Golfklubb", @"Stavanger Golfklubb", @"Steinkjer Golfklubb", @"Stiklestad Golfklubb", @"Stjørdal Golfklubb", @"Stord Golfklubb", @"Stranda Golfklubb", @"Stryn Golfklubb", @"Sunndal Golfklubb", @"Sunnfjord Golfklubb", @"Sunnmøre Golfklubb", @"Surnadal Golfklubb", @"Tjøme Golfklubb", @"Tromsø Golfklubb", @"Trondheim Golfklubb", @"Trysil Golfklubb", @"Tyrifjord Golfklubb", @"Ullensaker Golfklubb", @"Valdres Golfklubb", @"Vanylven Golfklubb", @"Varanger Golfklubb", @"Vesterålen Golfklubb", @"Vestfold Golfklubb", @"Vildmarken Golfklubb", @"Volda Golfklubb", @"Voss Golfklubb", @"Vrådal Golfklubb", @"Østmarka Golfklubb", @"Øya Golfpark", @"Ålesund Golfklubb", nil]; self.banenavn = temp; [temp release]; self.title = @"Golfbaner i Norge"; self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; } (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; } (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; } (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations. return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ // Customize the number of sections in the table view. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [banenavn count]; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } cell.textLabel.text = [banenavn objectAtIndex:indexPath.row]; return cell; } /* // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the specified item to be editable. return YES; } */ /* // Override to support editing the table view. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { // Delete the row from the data source. [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; } else if (editingStyle == UITableViewCellEditingStyleInsert) { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view. } } */ /* // Override to support rearranging the table view. - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { } */ /* // Override to support conditional rearranging of the table view. - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the item to be re-orderable. return YES; } */ (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { golf = [banenavn objectAtIndex:indexPath.row]; golfbaner *detailViewController = [[golfbaner alloc] initWithNibName:@"Golfbaner" bundle:nil]; [self.navigationController pushViewController:detailViewController animated:YES]; [detailViewController release]; } (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Relinquish ownership any cached data, images, etc that aren't in use. } (void)viewDidUnload { [super viewDidUnload]; // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. // For example: self.myOutlet = nil; } (void)dealloc { [super dealloc]; } @end

    Read the article

  • Can I ignore a SIGFPE resulting from division by zero?

    - by Mikeage
    I have a program which deliberately performs a divide by zero (and stores the result in a volatile variable) in order to halt in certain circumstances. However, I'd like to be able to disable this halting, without changing the macro that performs the division by zero. Is there any way to ignore it? I've tried using #include <signal.h> ... int main(void) { signal(SIGFPE, SIG_IGN); ... } but it still dies with the message "Floating point exception (core dumped)". I don't actually use the value, so I don't really care what's assigned to the variable; 0, random, undefined... EDIT: I know this is not the most portable, but it's intended for an embedded device which runs on many different OSes. The default halt action is to divide by zero; other platforms require different tricks to force a watchdog induced reboot (such as an infinite loop with interrupts disabled). For a PC (linux) test environment, I wanted to disable the halt on division by zero without relying on things like assert.

    Read the article

  • Externally disabling signals for a Linux program.

    - by Harry
    Hello, On Linux, is it possible to somehow disable signaling for programs externally... that is, without modifying their source code? Context: I'm calling a C (and also a Java) program from within a bash script on Linux. I don't want any interruptions for my bash script, and for the other programs that the script launches (as foreground processes). While I can use a... trap '' INT ... in my bash script to disable the Ctrl C signal, this works only when the program control happens to be in the bash code. That is, if I press Ctrl C while the C program is running, the C program gets interrupted and it exits! This C program is doing some critical operation because of which I don't want it be interrupted. I don't have access to the source code of this C program, so signal handling inside the C program is out of question. #!/bin/bash trap 'echo You pressed Ctrl C' INT # A C program to emulate a real-world, long-running program, # which I don't want to be interrupted, and for which I # don't have the source code! # # File: y.c # To build: gcc -o y y.c # # #include <stdio.h> # int main(int argc, char *argv[]) { # printf("Performing a critical operation...\n"); # for(;;); // Do nothing forever. # printf("Performing a critical operation... done.\n"); # } ./y Regards, /HS

    Read the article

  • Connecting a Wifi router to receivers with a cable instead of antenna?

    - by 31eee384
    This is a very strange question--I'd go so far as to say it's a stupid question. I'm being told that it is possible to, to describe it briefly, use a cable to connect an access point and a receiver directly to one another. This means that I would unscrew the access point's antenna, and attach one end of a cable to the port. Then, on the wireless receiver, I would also unscrew the antenna and plug in the other side of the cable. I'm being told the connection would work after this, just as a normal Wifi connection would. Bonus mini-question: if this works, would it still work if a splitter were attached to the access point and multiple receivers plugged in to the network? What would happen if I do this? Based on my surprisingly deficient knowledge of radio transmission, I don't think it would work. I would like some help knowing why it won't (or will) though, if possible. This is a somewhat hypothetical question--I realize that Ethernet does this exact job very handily, and I could just throw in a switch instead of the splitter. I simply feel that I should understand this scenario. Thanks for any help you can offer.

    Read the article

  • How to disable ^C from being echoed on Linux on Ctrl-C

    - by pts
    When I press Ctrl-C in any pseudoterminal (xterm, gnome-terminal, rxvt, text console and SSH) in Karmic Koala, the string ^C gets echoed to the terminal in Ubuntu Karmic Koala. This hasn't happened in Ubuntu Jaunty Jackalope. I'd like to get rid of the extra ^C. Example: $ cat foo foo ^C $ _ I got the above by typing C, A, T, Enter, F, O, O, Enter, Ctrl-C. I want to get rid of the ^C, and get this for the same keypresses: $ cat foo foo $ _ I tried setting stty -echoctl, which created a single-character HT (or a box with Unicode 0003 in it) instead of the ^C. I want to see absolutely nothing when I press Ctrl-C. I'm using Linux linux 2.6.31-20-generic-pae #57-Ubuntu SMP Mon Feb 8 10:23:59 UTC 2010 i686 GNU/Linux

    Read the article

  • How to make a Shell Script create a copy and terminate itself?

    - by ricedragon
    So far I used trap " call function" 2 fucntion { ./test.sh exit } but it never reaches the exit line and a whole bunch of process piles up any one got any idea? I tried & (bg) but i need to be able to keep doing it , the bg only allows me to do it once The point of it is when i type ctrl C it should terminate the original test.sh but it should also call itself before terminating hence create a new process.

    Read the article

  • Calling pthread_cond_signal without locking mutex

    - by Maysam
    Hi, I read somewhere that we should lock the mutex before calling pthread_cond_signal and unlock the mutext after calling it: The pthread_cond_signal() routine is used to signal (or wake up) another thread which is waiting on the condition variable. It should be called after mutex is locked, and must unlock mutex in order for pthread_cond_wait() routine to complete. My question is: isn't it OK to call pthread_cond_signal or pthread_cond_broadcast methods without locking the mutex?

    Read the article

  • Program received signal from GDB: EXC_BAD_ACCESS

    - by user577185
    Well, I'm starting development on the Mac OS X this code that you'll see is in a book that I bought, really basic like Chapter 3. And I can't run it. PLEASE HELP ME: C301.m : #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { if (argc == 1) { NSLog (@"You need to provide a file name"); return -1; } FILE *wordFile = fopen("tmp/words.txt", "r"); char word[100]; while (fgets(word, 100, wordFile)) { word[strlen(word) - 1] = '\0'; NSLog(@"%s is %d characters long", word, strlen(word)); } fclose(wordFile); return 0; } //main The file is in its place. Thank you so much!

    Read the article

  • post_save signal on m2m field

    - by Dmitry Shevchenko
    I have a pretty generic Article model, with m2m relation to Tag model. I want to keep count of each tag usage, i think the best way would be to denormalise count field on Tag model and update it each time Article being saved. How can i accomplish this, or maybe there's a better way?

    Read the article

  • Learn mp3 format and audio signal processing

    - by Shankhoneer Chakrovarty
    I am trying to learn the following things: How mp3 file looks like internally? I found this: http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html but it seems old. Is there any recent changes to the format? I couldnt find any. How to open a mp3 file in java and look for bytes? I tried using audiostream but I am getting a lot of zeros and signed short integers which nowhere resemble the header/body format as mentioned in the above link. Am I wrong in interpreting the bytes? How to get amplitude, frequency and pitch of a mp3 file? No idea. Can you please suggest some book or tutorial? Can you please help me in getting the solution for the above questions? I am sorry if some questions appear to be naive, I am a just begun to learn mp3. Thanks

    Read the article

  • How to send Event signal through Processes - C

    - by Jamie Keeling
    Hello all! I have an application consisting of two windows, one communicates to the other and sends it a struct constaining two integers (In this case two rolls of a dice). I will be using events for the following circumstances: Process a sends data to process b, process b displays data Process a closes, in turn closing process b Process b closes a, in turn closing process a I have noticed that if the second process is constantly waiting for the first process to send data then the program will be just sat waiting, which is where the idea of implementing threads on each process occurred and I have started to implement this already. The problem i'm having is that I don't exactly have a lot of experience with threads and events so I'm not sure of the best way to actually implement what I want to do. I'm trying to work out how the other process will know of the event being fired so it can do the tasks it needs to do, I don't understand how one process that is separate from another can tell what the states the events are in especially as it needs to act as soon as the event has changed state. Thanks for any help Edit: I can only use the Create/Set/Open methods for events, sorry for not mentioning it earlier.

    Read the article

  • about the post_save signal and created argument

    - by panchicore
    the docs says: post_save django.db.models.signals.post_save created A boolean; True if a -new- record was create. and I have this: from django.db.models.signals import post_save def handle_new_user(sender, instance, created, **kwargs): print "--------> save() "+str(created) post_save.connect(handle_new_user, sender=User) when I do in shell: u = User(username="cat") u.save() >>> --------> save() True u.username = "dog" u.save() >>> --------> save() True I expect a -------- save() False when I save() the second time because is an update? not?

    Read the article

  • How to signal a buffer full state between posix threads

    - by mikip
    Hi I have two threads, the main thread 'A' is responsible for message handling between a number of processes. When thread A gets a buffer full message, it should inform thread B and pass a pointer to the buffer which thread B will then process. When thread B has finished it should inform thread A that it has finished. How do I go about implementing this using posix threads using C on linux. I have looked at conditional variables, is this the way to go? . I'm not experienced in multi threaded programming and would like some advice on the best avenue to take. Thanks

    Read the article

  • C signal parent process from child

    - by Gary
    I'm trying to solve a problem I've got where a child process runs execvp() and needs to let the parent know if it returns. So, after the execvp() returns (because there's been an error), how can I tell the parent that this particular event has happened so it can handle it. There's one method of writing a string of text through the pipe I'm using and then reading that from the parent.. but it seems a bit sloppy. Is there a better way? Thanks!

    Read the article

  • waiting for a signal

    - by Umesha MS
    Hi, I am working on an application which uploads the content of the file to server. To upload the file to server I am using ‘QNetworkAccessManager’ class. Since it works as asynchronous way, I changed it to work as synchronous way by using QEventLoop. Class FileTransfer { Public : QNetworkAccessManager mNetworkManager; Void Upload(QNetworkRequest request, QIODevice *data) { responce = mNetworkManager.put(request, data); EventLoop.exec(); ReadResponce(responce); } Void Stop() { responce ->close(); } } In my sample application I have 2 windows. 1st to select the files and 2nd to show the progress. When user click on upload button in the first window, the 2nd window will be displayed and then I create the FileTransfer object and start uploading. While uploading the file if user closes the form then in the destructor of the window I call the stop of ‘FileTransfer’ after that I delete the ‘FileTransfer’ object. But here the Upload() function is not yet completed so it will crash. Please help me to: How to wait in 'stop()' function until the Upload() function is completed

    Read the article

  • is there a signal emiter/consumer engine (like in Django) for .NET (C#)

    - by user118657
    Has .NET (C#) anything like Django's Signals engine? Our business logic become really complicated over few years of adding new features. I'm going to re-architecture it. Currently all features are very coupled that makes regression errors while changing something one one place - some other place may be broken. I really like Django's apps idea where separate applications introduce new functionality and are absolutely separate. Communication between apps is implemented though signals. I wounder if there is something in .NET that allows to divide project business to many separated "apps" (plug-ins, zones, modules, you name it) and make communication using some kind of "signals". For example we have simple order flow. We can add "coupon app" that if exists in the project adds abilities to use discount coupon. We can add "cross sale" module that if exists adds abilities to offer cross-sale products Email notification module that if exists adds abilities to send order email notifications. But in the same time all this modules are "self-contained" means that communication between them is done using emitting signals (ORDER_PROCCESS_START, ORDER_SUCCESS, etcs) and other modules can subscribe to this signals and process them in required way. This architecture is not related to web, all business logic is processed on the server side like without working with HTTP directly. I wonder if it's good architecture from code maintaining and testing point of few, is it possible to do this in .NET? Any drawbacks that I don't realize now?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >