ctrl-c not working in linux #255

Closed
opened 2026-01-29 16:39:06 +00:00 by claunia · 3 comments
Owner

Originally created by @cfsmp3 on GitHub (Jan 23, 2017).

ctrl-c (sigint) is not working on the linux version, which is quite annoying.

Originally created by @cfsmp3 on GitHub (Jan 23, 2017). ctrl-c (sigint) is not working on the linux version, which is quite annoying.
Author
Owner

@Izaron commented on GitHub (Jan 24, 2017):

After removing this line all is OK - https://github.com/CCExtractor/ccextractor/blob/master/src/ccextractor.c#L154
But don't sure if we should just remove this line without understanding.

@Izaron commented on GitHub (Jan 24, 2017): After removing this line all is OK - https://github.com/CCExtractor/ccextractor/blob/master/src/ccextractor.c#L154 But don't sure if we should just *remove* this line without understanding.
Author
Owner

@saurabhshri commented on GitHub (Jan 24, 2017):

@Izaron Instead of deleting it, I think it will be better to appropriately handle it. For example, if we want to terminate it ASAP on receiving SIGINT, we can do this -> (https://github.com/CCExtractor/ccextractor/compare/master...saurabhshri:patch-2).

@cfsmp3 Please have a look at the above commit. Does this seem okay to you?

Edit : Here's how it looks. Whatever action you would recommend, we will write instead of terminate_asap = 1; :

NOW


./ccextractor -
CCExtractor 0.85, Carlos Fernandez Sanz, Volker Quetschke.
Teletext portions taken from Petr Kutalek's telxcc
--------------------------------------------------------------------------
Input: stdin
[Extract: 1] [Stream mode: Autodetect]
[Program : Auto ] [Hauppage mode: No] [Use MythTV code: Auto]
[Timing mode: Auto] [Debug: No] [Buffer input: No]
[Use pic_order_cnt_lsb for H.264: No] [Print CC decoder traces: No]
[Target format: .srt] [Encoding: UTF-8] [Delay: 0] [Trim lines: No]
[Add font color data: Yes] [Add font typesetting: Yes]
[Convert case: No] [Video-edit join: No]
[Extraction start time: not set (from start)]
[Extraction end time: not set (to end)]
[Live stream: Yes, no timeout] [Clock frequency: 90000]
[Teletext page: Autodetect]
[Start credits text: None]

-----------------------------------------------------------------
Reading from standard input
^CCaught SIGINT. Terminating ASAP.

File seems to be an elementary stream, enabling ES mode
Analyzing data in general mode
Done, processing time = 6 seconds
Issues? Open a ticket here
https://github.com/CCExtractor/ccextractor/issues
No captions were found in input.

PREV

./ccextractor -
CCExtractor 0.84, Carlos Fernandez Sanz, Volker Quetschke.
Teletext portions taken from Petr Kutalek's telxcc
--------------------------------------------------------------------------
Input: stdin
[Extract: 1] [Stream mode: Autodetect]
[Program : Auto ] [Hauppage mode: No] [Use MythTV code: Auto]
[Timing mode: Auto] [Debug: No] [Buffer input: No]
[Use pic_order_cnt_lsb for H.264: No] [Print CC decoder traces: No]
[Target format: .srt] [Encoding: UTF-8] [Delay: 0] [Trim lines: No]
[Add font color data: Yes] [Add font typesetting: Yes]
[Convert case: No] [Video-edit join: No]
[Extraction start time: not set (from start)]
[Extraction end time: not set (to end)]
[Live stream: Yes, no timeout] [Clock frequency: 90000]
[Teletext page: Autodetect]
[Start credits text: None]

-----------------------------------------------------------------
Reading from standard input
^C

^C



^C^C^C
^Z
[11]+  Stopped                 ./ccextractor -

@saurabhshri commented on GitHub (Jan 24, 2017): @Izaron Instead of deleting it, I think it will be better to appropriately handle it. For example, if we want to terminate it ASAP on receiving SIGINT, we can do this -> (https://github.com/CCExtractor/ccextractor/compare/master...saurabhshri:patch-2). @cfsmp3 Please have a look at the above commit. Does this seem okay to you? Edit : Here's how it looks. Whatever action you would recommend, we will write instead of `terminate_asap = 1;` : **NOW** ``` ./ccextractor - CCExtractor 0.85, Carlos Fernandez Sanz, Volker Quetschke. Teletext portions taken from Petr Kutalek's telxcc -------------------------------------------------------------------------- Input: stdin [Extract: 1] [Stream mode: Autodetect] [Program : Auto ] [Hauppage mode: No] [Use MythTV code: Auto] [Timing mode: Auto] [Debug: No] [Buffer input: No] [Use pic_order_cnt_lsb for H.264: No] [Print CC decoder traces: No] [Target format: .srt] [Encoding: UTF-8] [Delay: 0] [Trim lines: No] [Add font color data: Yes] [Add font typesetting: Yes] [Convert case: No] [Video-edit join: No] [Extraction start time: not set (from start)] [Extraction end time: not set (to end)] [Live stream: Yes, no timeout] [Clock frequency: 90000] [Teletext page: Autodetect] [Start credits text: None] ----------------------------------------------------------------- Reading from standard input ^CCaught SIGINT. Terminating ASAP. File seems to be an elementary stream, enabling ES mode Analyzing data in general mode Done, processing time = 6 seconds Issues? Open a ticket here https://github.com/CCExtractor/ccextractor/issues No captions were found in input. ``` **PREV** ``` ./ccextractor - CCExtractor 0.84, Carlos Fernandez Sanz, Volker Quetschke. Teletext portions taken from Petr Kutalek's telxcc -------------------------------------------------------------------------- Input: stdin [Extract: 1] [Stream mode: Autodetect] [Program : Auto ] [Hauppage mode: No] [Use MythTV code: Auto] [Timing mode: Auto] [Debug: No] [Buffer input: No] [Use pic_order_cnt_lsb for H.264: No] [Print CC decoder traces: No] [Target format: .srt] [Encoding: UTF-8] [Delay: 0] [Trim lines: No] [Add font color data: Yes] [Add font typesetting: Yes] [Convert case: No] [Video-edit join: No] [Extraction start time: not set (from start)] [Extraction end time: not set (to end)] [Live stream: Yes, no timeout] [Clock frequency: 90000] [Teletext page: Autodetect] [Start credits text: None] ----------------------------------------------------------------- Reading from standard input ^C ^C ^C^C^C ^Z [11]+ Stopped ./ccextractor - ```
Author
Owner

@cfsmp3 commented on GitHub (Jan 24, 2017):

Both solutions are OK. The problem is that we're mixing different (and incompatible) ways to setup handlers. I've solved it by having 3 handlers that are setup in the same way.

@cfsmp3 commented on GitHub (Jan 24, 2017): Both solutions are OK. The problem is that we're mixing different (and incompatible) ways to setup handlers. I've solved it by having 3 handlers that are setup in the same way.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#255