Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - svenvanhal

#1
Hi Liviu,

I'm sorry for the late reply. fet-cl now doesn't fail anymore when using the argument, but it still shows up in the help text when calling fet-cl without arguments. Was that your intention?
#2
Good morning,

I'm trying to configure fet-cl, but when I set the command line argument "--warnifusinggroupactivitiesininitialorder=false", fet-cl return the following:

Unrecognized option: --warnifusinggroupactivitiesininitialorder=false

But when I run fet-cl without arguments (to view the documentation), it says:

fet-cl [--warnifusinggroupactivitiesininitialorder=g]
(..)
g is either true or false, represents whether you want a message box to be shown, with a warning, if the input file contains nonstandard timetable generation options to group activities in the initial order (default true).

I also can't find it in the source code. Does this parameter still exist?

Cheers,
Sven
#3
Suggestions / Re: Question regarding SIGTERM
May 29, 2018, 07:00:06 PM
Works like a charm :)
#4
Suggestions / Re: Question regarding SIGTERM
May 29, 2018, 03:50:22 PM
Sounds good, thank you very much!
#5
Suggestions / Re: Question regarding SIGTERM
May 29, 2018, 03:25:41 PM
Ah, I see. Who knew these signals would be such a pain.

Would this be an appropriate solution? https://stackoverflow.com/questions/181413/how-to-handle-a-ctrl-break-signal-in-a-command-line-interface

#6
Suggestions / Re: Question regarding SIGTERM
May 29, 2018, 02:45:22 PM
Hi Liviu,

Thanks for your quick reply!

The SIGINT signal is working perfectly on Windows and this is the approach I am currently using. However, I would indeed like to use the partial results. I think the easiest solution (and compatible with all platforms) would be to change from SIGTERM to SIGBREAK.

So when I would press CTRL+C in the console, I send a SIGINT signal and fet-cl terminates immediately.
If I would press CTRL+BREAK, fet-cl writes the partial results to the disk and terminates thereafter.

I think you can keep the SIGTERM behaviour for backwards compatibility. I'm not fluent in c++, but you might add after line 1305 in fet.cpp:

signal(SIGBREAK, terminate);
#7
Suggestions / Question regarding SIGTERM
May 29, 2018, 12:59:15 PM
Dear Liviu, Volker,

Currently, I'm working on a C# wrapper for FET-CL which interfaces with a database, prepares input files, processes FET output, etc. I am trying to implement functionality that terminates fet-cl gracefully. Per your documentation, sending a SIGTERM signal would stop the timetable generation, write the intermediary results to disk and close the program.

However, on Windows, sending a SIGTERM signal is unsupported. See:
https://stackoverflow.com/questions/1216788/win32-api-analog-of-sending-catching-sigterm

and

https://msdn.microsoft.com/en-us/library/xdkz3x12.aspx
"The SIGILL and SIGTERM signals are not generated under Windows. They are included for ANSI compatibility."


What is your recommended way to stop fet-cl gracefully on Windows? If it's actually not possible, would you consider changing SIGTERM to:

SIGBREAK -- https://docs.microsoft.com/en-us/windows/console/ctrl-c-and-ctrl-break-signals

a native Windows signal on just Windows (https://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows)

or maybe listen on stdin for a predefined control sequence (e.g. we could send a /x3 character or maybe a string like "STOP")

Thanks in advance!

Kind regards,
Sven