search for: fflush

Displaying 20 results from an estimated 306 matches for "fflush".

Did you mean: flush
2012 May 29
0
[klibc:master] capabilities: Use fflush() instead of fseek ()
...rg/?p=libs/klibc/klibc.git;a=commit;h=163920f31f98db13f4e37796bb92f0844e7aaf45 Author: maximilian attems <max at stro.at> AuthorDate: Tue, 29 May 2012 18:58:31 +0200 Committer: maximilian attems <max at stro.at> CommitDate: Tue, 29 May 2012 19:03:08 +0200 [klibc] capabilities: Use fflush() instead of fseek() It shouldn't use stream I/O against a control device at all in do_usermodehelper_file(), as noted by hpa. Stylistically rewind seems cleaner, but fflush() has error checking. Reported-by: H. Peter Anvin <hpa at zytor.com> Signed-off-by: maximilian attems <max at...
2008 Feb 12
1
fflush now?
....winehq.org/pipermail/wine-cvs/2006-March/021782.html Has it returned? I believe I found a page yesterday mentioning flush and app exit with Alexandre Julliard, but this isn't the one http://www.winehq.org/pipermail/wine-patches/2005-May/017363.html I recall running a wine-0.9.27 or later and fflush worked (not using pipes). If you try it from PHP, the $descriptorspec should be = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "w") ); ("w", not "r" for stderr, index 2...
2012 Sep 26
0
[LLVMdev] Error while loading profile information
...} namespace { class ARMInstrStats : public MachineFunctionPass { private: int cnt; ProfileInfoLoader &PIL; public: static char ID; explicit ARMInstrStats(ProfileInfoLoader &_PIL) : MachineFunctionPass(ID), PIL(_PIL){ printf("\n%s:%d",__FILE__,__LINE__); fflush(stdout); } virtual const char *getPassName() const { return "ARM Instr Stats Pass"; } void processMBB(const MachineBasicBlock &MBB) { //double execcnt=1; int blckno=0; blckno=MBB.getNumber(); ProfileInfo &PI=getAnalysis<ProfileInfo>(); printf(&quot...
2019 Aug 01
1
Are those functions thread-safe, i.e. fprintf() and fflush()
Hi, I have one question: Are those functions thread-safe, i.e. fprintf() and fflush() ? Thanks! Regard Andrew
2008 Mar 14
0
[PATCH] Add periodic fflush to xentop batch mode.
Add periodic fflush to xentop(batch mode). If you want to make monitor tool using the following command, you can not get output every some seconds. xentop -b -d 1 > xentop.log (above tool use tail command to get periodic data from xentop.log) This patch is useful when you get xentop output(batch mode) periodica...
2003 Nov 10
3
AGI and PHP
...// codes to save the info goes here // or do nothing } 7. this is the point where you can start talking with *. use fputs to send * agi commands; some people use echo but i prefer fputs: fputs($stdout,"SAY NUMBER 1234567 '79#' \n"); fflush($stdout); 7a. use fflush() regardless of php.ini setting just to be safe, does hurt if you don't fflush() (auto or manual), * will not receive the command and your app will be stuck there until timeout. 7b. use of quotes; * agi command options are not optional i.e....
2011 Aug 02
0
Adding fflush() to ssh-agent so its output can be redirected to a file
...8.890134187 -0700 +++ ssh-agent.c 2011-08-01 21:13:08.995357974 -0700 @@ -1281,6 +1281,7 @@ printf(format, SSH_AUTHSOCKET_ENV_NAME, socket_name, SSH_AUTHSOCKET_ENV_NAME); printf("echo Agent pid %ld;\n", (long)parent_pid); + fflush(stdout); goto skip; } pid = fork();
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...+ usr/klibc/fgets.c | 1 + usr/klibc/fputc.c | 1 + usr/klibc/fputs.c | 1 + usr/klibc/fread2.c | 1 + usr/klibc/fwrite2.c | 2 ++ usr/klibc/stdio/clearerr.c | 1 + usr/klibc/stdio/feof.c | 1 + usr/klibc/stdio/ferror.c | 1 + usr/klibc/stdio/fflush.c | 2 +- usr/klibc/stdio/fgetc.c | 1 + usr/klibc/stdio/fileno.c | 1 + 12 files changed, 32 insertions(+), 1 deletion(-) diff --git a/usr/include/stdio.h b/usr/include/stdio.h index 1d45fe1a..521213df 100644 --- a/usr/include/stdio.h +++ b/usr/include/stdio.h @@ -48,17 +48,24 @@ __exte...
2013 May 05
2
Bug fix and compatibility patches for 1.3.0pre4
...internal format and is intended for use only by *fgetpos* and *fsetpos*." (http://msdn.microsoft.com/en-us/library/70hdhh4t%28v=vs.80%29.aspx), so I don't think it's a good idea to use it this way even if tests suggested it works. I'll write a test program tomorrow to try the fflush+_lseeki64 approach. Another solution - although a bit ugly - might be to disable buffering on Windows using setvbuf.
2012 Feb 08
2
slow creating files
...*to; char str[]="0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"; time_t start, end; double diff; time(&start); to=fopen(argv[1], "w+"); for(i=0; i < fsize/100; i++) { fprintf(to, "\n%7d-%s",i, str); / fflush(to); // makes it slow!/ } fclose(to); time(&end); diff=difftime(end,start); printf("\n \t time_diff = %.2lf", diff); } This was started on Win7 client PC, It creates about 40 mbytes size file in pointed path. Comparing timings on our samba share and win2k3 share gives: ~40 sec...
2008 Jul 28
2
Rf_error crashes entire program.
...ather than throwing the error like it should. Here are the relevant bits. ... char const * const ExeedsMinVarianceError = "PFDA ERR: Near zero variance encountered. Estimation Unstable. Terminating Estimation."; .... if(debug){printf("Da:\n");printmat(DaOld,1,*ka);fflush(stdout);} daxpy_(ka, &mOne, Da, &one, DaOld, &one); for(i=0;i<*ka;i++)convergenceCriteria+=fabs(DaOld[i]); if(Da[*ka] < MinVariance){ printf("PING");fflush(stdout); warning(ExeedsMinVarianceError); break;...
2009 Aug 19
2
[PATCH libguestfs] guestfish: detect a few more failed syscalls
...+++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/fish/fish.c b/fish/fish.c index 830617b..e6cd270 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -750,8 +750,14 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) if (pipecmd) { int fd[2]; - fflush (stdout); - pipe (fd); + if (fflush (stdout)); { + perror ("failed to flush standard output"); + return -1; + } + if (pipe (fd)) { + perror ("pipe failed"); + return -1; + } pid = fork (); if (pid == -1) { perror ("fork&qu...
2020 Apr 14
0
[nbdkit PATCH v2 2/3] server: Sanitize stdin/out before running plugin code
...p over to /dev/null into a central location, right before .get_ready. Note that if a plugin consumes some, but not all, input during .config, then we want --run to pick up with reading the rest of the input. For that to happen, we need to flush any buffered read-ahead data from stdin. POSIX says fflush(NULL) is supposed to be sufficient for the task, but in practice, glibc still has a bug that requires an additional fflush(stdin). Signed-off-by: Eric Blake <eblake@redhat.com> --- server/internal.h | 2 ++ server/background.c | 14 +++++--------- server/captive.c | 10 ++++++++--...
2005 May 28
1
(PR#7899) seek(con, 0, "end", rw="r") does not always work
...wrote: > >> tplate@blackmesacapital.com wrote: >> >> >>> I've noticed that seek(con, 0, "end", rw="r") on a file connection >>> does not always work correctly after a write (R 2.1.0 on Windows). >>> >>> [Is a call to fflush() needed inside file_seek() in main/connections.c?] >> >> >> >> >> If you have an idea where to fflush() precisely and your patch works, >> please tell it! I'll happily run some test cases where seeking matters. >> > > I couldn't see why the...
2006 Mar 22
7
FreeBSD Security Advisory FreeBSD-SA-06:13.sendmail
...n details The following list contains the revision numbers of each file that was corrected in FreeBSD. Branch Revision Path - ------------------------------------------------------------------------- RELENG_4 src/contrib/sendmail/libsm/fflush.c 1.1.1.1.2.1 src/contrib/sendmail/libsm/local.h 1.1.1.1.2.6 src/contrib/sendmail/libsm/refill.c 1.1.1.1.2.4 src/contrib/sendmail/src/collect.c 1.1.1.4.2.17 src/contrib/sendmail/src/conf.c...
2007 Oct 02
3
[PATCH] SIGTERM and SIGINT handler to flush xentop -b outputs
...ools/xenstat/xentop/xentop.c Tue Oct 02 09:09:55 2007 +0800 @@ -31,6 +31,7 @@ #if defined(__linux__) #include <linux/kdev_t.h> #endif +#include <signal.h> #include <xenstat.h> @@ -1011,6 +1012,13 @@ static void top(void) free(domains); } + +void a_sig_handler(int n) +{ + fflush(stdout); + exit(0); +} + int main(int argc, char **argv) { int opt, optind = 0; @@ -1102,6 +1110,8 @@ int main(int argc, char **argv) ch = getch(); } while (handle_key(ch)); } else { + signal(SIGTERM, a_sig_handler); + signal(SIGINT, a_sig_handler); do { gettimeofday(&...
2007 May 21
2
question on zenity centos 5
I am trying to use zenity --progress. When I use this script: #!/bin/sh ( echo "10" ; sleep 1 echo "20" ; sleep 1 echo "50" ; sleep 1 echo "75" ; sleep 1 echo "100" ; sleep 1 ) | zenity --progress ~ It works fine... When I use a little program. for(count = 0; count <= 100; count += 10) {
2004 May 18
1
Dial and MeetMe on the same channel
...all\n"); strcpy(cmd,"EXEC Dial "); strcat(cmd,numtocall); //numtocall is a variable quote from teh database strcat(cmd," 60"); // Ex?cution de la commande et lib?ration du buffer fprintf(stderr,"%s\n",cmd); printf("%s\n",cmd); fflush(stdout); resultcode = checkresult(); // Mise en conf?rence de l'operateur strcpy(cmd1,""); strcpy(cmd1,"EXEC MeetMe "); strcat(cmd1,confroom); //confroom is a variable quote from teh database strcat(cmd1,"|q"); fprintf(stderr,"%s\n...
2012 May 31
1
klibc 2.0 release
...ot; for O_CLOEXEC [klibc] Move _IO_file_flags from stdio.h to stdioint.h [klibc] Add zalloc() function [klibc] Restructure the FILE object to allow simple inlines [klibc] Fix confusion between _IONBF and _IOFBF [klibc] Make byte counters in stdio unsigned [klibc] fflush: discard input data [klibc] fseek: report error on fflush() failure [klibc] f[d]open: don't bother setting input buffer [klibc] Add rewind() function [klibc] fgets: shave a few bytes off [klibc] fgets: remove obsolete comment [klibc] Optimize fgetc() to read...
2007 Aug 24
0
MYSQL problem and configuration
...agi_","",$s[0]); $agi[$name]=trim($s[1]);}return $agi;}function checkresult($res){ trim($res); if(preg_match('/^200/',$res)) { if(!preg_match('/result=(-?\d+)/',$res,$matches)) { fwrite(STDERR,"FAIL ($res)\n"); fflush(STDERR); return0; } else { fwrite(STDERR,"PASS (".$matches[1].")\n"); fflush(STDERR); return $matches[1]; } } else { fwrite(STDERR,"FAIL (unexpected result '$res')\n"); fflush(STDERR);...