Comments (9)
I intentionally check it after each loop so an image doesn't get half printed
I'm afraid your knowledge is way higher than mine and that I cannot see what will this bring to catimg. I really appreciate it as I'm learning many interesting things but I cannot see any any benefit from using the sig_atomic_t
. To me this seems a bit overkill.
However if you change the code, create a PR and prove the code have been improved in efficiency or in error handling, I'll merge it.
I'm going to add an option for the number of loops so that line will be needed
from catimg.
… I cannot see any any benefit from using the sig_atomic_t.
The reuse of this data type is one of the preferred ways for the portable data exchange with your signal handler. How do you think about to improve software portability a bit here?
An other software design option would be to delegate signal handling or the image file processing to another thread, wouldn't it?
from catimg.
ok for the portability. Having multiple threads for catimg just to handle the sigterm or any other signal is overkill, don't you think
from catimg.
Having multiple threads for catimg just to handle the sigterm or any other signal is overkill, …
It depends on user expectations for your software application. In which time frame would you like to see the appropriate response for the event "SIGINT"?
from catimg.
It depends on user expectations for your software application
Well, nobody complained about it yet.
In which time frame would you like to see the appropriate response for the event "SIGINT"?
At the end of an image/frame for a GIF and anytime for a normal image. Although this may vary on the terminal size. I guess I'll etablish a pixel count. I'll run some test and call the handler after that many pixels are displayed
from catimg.
I guess I'll etablish a pixel count.
Is such an approach really needed?
Will an immediate reaction be usually more appropriate?
from catimg.
nope, as I said in the first comment
from catimg.
I assume that there are users who will not like delayed signal handling.
Can the portable data type "sig_atomic_t" be applied at least?
from catimg.
I'll see, thanks
from catimg.
Related Issues (20)
- heap buffer overflow in stbi__tga_load
- segfault in stbi__getn HOT 3
- heap-buffer-overflow in img_load_from_data HOT 1
- ASan global-buffer-overflow src/stb_image.h:1923 in stbi__extend_receive HOT 1
- I can't compile it HOT 1
- Incorrect colour output with zsh HOT 1
- width (-w) handling depending on resolution HOT 2
- preview in ssh HOT 2
- Script not working on macos catalina HOT 4
- catimg retired in Fedora repository HOT 8
- Please support GCC10 HOT 1
- watch -c doesn't work properly with catimg
- Segmentation fault caused by null pointer exception HOT 1
- Show one text and one image side by side HOT 4
- Exceeds maximum supported memory when processing gif with excessive w*h
- Exceeding the valid memory range while parsing the GIF file's background
- Modify image aspect ratio for different terminal fonts HOT 3
- piping catimg doesn't properly work HOT 2
- Images do not properly scale vertically HOT 2
- Corrupted GIF header causes null pointer dereference by failed allocation due to integer overflow HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from catimg.