All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry.Martinez@inria.fr (Thierry Martinez)
To: cocci@systeme.lip6.fr
Subject: [Cocci] coccilib.report.print_report Broken For Redirected STDOUT
Date: Sun, 12 Feb 2017 01:23:50 +0100	[thread overview]
Message-ID: <ow4tw80p889.fsf@inria.fr> (raw)
In-Reply-To: <alpine.DEB.2.20.1702112020360.1955@hadrien>

Hello!

Michael:
>> spatch cocciprint.cocci cocciprint.c  > /tmp/nothing
>> wc -c /tmp/nothing
>> 0 /tmp/nothing

Standard output gets buffered when redirected to a file and not flushed
as quickly as it is when there is no redirection: it is not specific to
coccilib.report.print_report and the same observation can be obtained
by just calling "print".

I just committed a simple fix on GitHub: standard outputs are now
flushed at the end of the processing of code transformation.

Thanks for the report. Best regards.
-- 
Thierry.

Julia Lawall (2017/02/11, 19:20 UTC)?:
> On Sat, 11 Feb 2017, Michael Stefaniuc wrote:
>
>> Hello!
>>
>> coccilib.report.print_report is not producing any output when STDOUT is
>> redirected to a file or a pipe. I have attached a simple test case.
>>
>> spatch cocciprint.cocci cocciprint.c
>> cocciprint.c:3:8-9: Printing Suceeded
>>
>> spatch cocciprint.cocci cocciprint.c  > /tmp/nothing
>> wc -c /tmp/nothing
>> 0 /tmp/nothing
>
> Thanks for the report.  Will have it looked into.
>
> julia
>
>>
>>
>> thanks
>> bye
>> 	michael
>>
> _______________________________________________
> Cocci mailing list
> Cocci at systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2017-02-12  0:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 19:13 [Cocci] coccilib.report.print_report Broken For Redirected STDOUT Michael Stefaniuc
2017-02-11 19:20 ` Julia Lawall
2017-02-12  0:23   ` Thierry Martinez [this message]
2017-02-13  9:47     ` Michael Stefaniuc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ow4tw80p889.fsf@inria.fr \
    --to=thierry.martinez@inria.fr \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.