1

Regarding this question.

Jonathan Leffler, 500k+ reputation, commented:

Is your problem resolved? If so, maybe you should delete this question.

IMO, I made a clear and concise question, not a duplicate. Later, I added a self-answer (based on some comments I received) that could help some people.

Why should I have considered to delete it (before I self-answered)? And should I consider to delete it now?

10
  • 1
    It most certainly looks like a valid problem that other programmers may run in to, and with an equally useful answer.
    – Jongware
    Jan 3, 2018 at 13:42
  • 5
    When they made that comment, you hadn't answered it. It was just hanging around with one low-quality answer and no obvious resolution in sight.
    – jonrsharpe
    Jan 3, 2018 at 13:52
  • 5
    You should preserve the order of events: 1) You asked a question 2) You said "Thank you that helped in a comment" 3) 5h later someone told you to delete your question if it is resolved 4) Another 4h later you answered. At the point where the please delete comment was placed, it was completely valid.
    – BDL
    Jan 3, 2018 at 13:53
  • 1
    @jonrsharpe Yes you're right, but Jonathan Leffer had already commented with all necessary information to resolve the problem. That means he prefered to suggest to delete to question than to answer it. It led me to think there was something wrong with my question. Jan 3, 2018 at 13:56
  • I updated the question to "preserve the order of events". Sorry for the misunderstanding. Jan 3, 2018 at 14:05
  • 4
    Is there any point to this meta question? If you don't want to delete the question then just don't. Nobody can force you to. Avoid looking for any deeper meaning, or personal slight, in a mere comment. Do consider tagging an OS-specific question with an appropriate tag so nobody has to worry that this is not standard [c]. Jan 3, 2018 at 14:10
  • 2
    @HansPassant A veteran user suggested me to consider deleting a question. I consider it by asking why, so that maybe next time I could improve my questions' quality if possible. That's the point. Jan 3, 2018 at 14:16
  • I gave a specific recommendation, if you don't want to use it then just don't. I can't force you to. The road you are traveling ends at a steep cliff, turn around and head somewhere else. Jan 3, 2018 at 14:26
  • @HansPassant I don't understand what motivates you to say such thing - you're rude to say the least. I thought users that were here for a long time (like you) would be more concerned than others to make this site a clean and usefull place. Obviously, this is not the case for you. Jan 3, 2018 at 14:48
  • 1
    You demonstrate it well. Some users that perceive rudeness are compelled to be rude back at least twice as much. Curse of the Internet. Jan 3, 2018 at 14:58

1 Answer 1

7

As noted in this MSO question, I asked:

Is your problem resolved? If so, maybe you should delete this question.

This allows the OP (Jules Lamur) to make the perfectly reasonable response:

@JonathanLeffler Thanks for your help. I prefer to post an answer based on the problems you've pointed instead of deleting my question, with the hope that it will help someone later.

And, were it not for the fact that there is this question on MSO, I would have removed my "should it be deleted" comment (which was carefully kept separate from my main information comment so it could be deleted non-controversially), and would have flagged the response as "no longer needed", and would have gone on to write the answer I've now written.

Time of day played a role in my response time. It was late evening for me when I wrote those comments.

One of the reasons I wondered if the question should be deleted is that "using incompletely initialized variables gives unexpected results" is not a very novel observation — there are lots of questions on SO where that's one of the underlying problems. It isn't often the main problem as it was in your case. I observe that the reproduction is not reliable; it depends on what garbage is in the act variable in your code. Despite your assertion that it is not a duplicate, I'm tolerably certain there have been several questions over the years where an improperly initialized signal handler structure has led to unexpected behaviour. I haven't>/s> hadn't gone to hunt them down (but see below), but I'm pretty sure I've answered some and almost certain I've seen some. They aren't going to be high-scoring questions and answers; uninitialized variables are not exciting.

There's also the standard Q&A on How to avoid using printf() in a signal handler.

So, while your question has good concise code and is well presented, I'm not convinced that it has a major educational benefit. However, there are many far worse questions. I'm quite happy to provide an answer that gives my spin on the problem and its resolution.

If you read between the lines of this response that "maybe this MSO question wasn't really necessary", you have read correctly, though this not a bad question.


Possible duplicates include:

This collection is from looking at the first 100 or so entries (out of nearly 750) found using the SO search '[c] sigaction is:q'. I'm not saying you should have found all or any of these before asking the question on SO — it requires some knowledge and quite a lot of determination to go through the questions to see what's what (I looked at maybe 15 in full, and selected just the 4 shown). But claiming "it is not a duplicate" in your question on MSO does require more effort, and most of those 4 could be used as a duplicate, and I've no doubt there are others that I didn't have the patience to find. (And no, none of those has an answer from me.)

1
  • 2
    Well said :) On a mere technical note: the standard Q&A (important enough to add to my favorites) literally starts with "Since printf is not reentrant, it's not supposed to be safe ..." That's why I would consider OP's question of worth for those who do not know that. (It's not mentioned in an (admittedly random) man page I consulted.)
    – Jongware
    Jan 3, 2018 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .