I have a compiled binary of a server written in C++ on my unix system. I want to dynamically start servers using a small script. I can specify the port the server will be running on as an argument. My question is if there is a problem with starting one binary multiple times and let them run parrallel instead of copying the binary. In my test it worked as expected but I want to be sure that there are no problems.
Is there an issue in unix running one C++ binary multiple times and parallel?
511 Views Asked by timakro At
2
There are 2 best solutions below
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in UNIX
- Reading & Writing to the same file from terminal
- `df` command not capturing entire output in perl
- Why is it that when I pass certain directory names to `ls`, sometimes it does not list their contents?
- Detect Mouse Clicks; Terminate Program on Scroll Wheel Movement
- grep expression behaving weird (unix/mac) while reading a conf file
- Unix sub path creation and copy files
- Ignoring folders in The Silver Searcher `ag`
- struct nameidata-Linux Kernel Module
- telegraf service not able to retrieve data using the journalctl commands
- Order of options in Unix sed for editing files in-place
- Trying to echo line variable along with another variable inside a while read loop
- failed to handshake with xxx: authentication error?
- UDP socket client not able to receive data
- Invalid SCA token in unix
- How can I keep randomized UNIX timestamp in specific hour range in SQL?
Related Questions in BINARYFILES
- binary file and interpretation in java script?
- What is 'Invalid Load Key, '\x00'
- I have a response from an API in the form of a binary file and I need to transform it into a PDF in react.js
- Python: Can't create a binary file with a "with open(xxxxx)" line, using an os.path generated path (single backslash passed as double?)
- Decode binary file in AWS environment using PySpark
- How to read a .bin file and display the extact content of it in a table cell?
- unable to open zip after creating it
- Executing binary file on Oracle image goes to Exec format error
- how to convert python string binary representation to json
- Python code for read/write binary file and convert it to .pcap
- Convert simple data format file(.sdf) to csv
- feof() doesn´t detect end of file when i'm updating a binary file in C/C++
- git repo size due to commit binary file to multiple branches
- adding firmware binary(.bin) in flash image in Modular FIT?
- In Android Studio how can I execute the iperf3 binary in Android app, ensuring the permissions are granted, and avoiding the "Permission denied"
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
First you can run multiple instances of the same binary on almost all operating systems, you do not need to copy it. However there is a deeper issue.
It all depends on how the application is written. In a perfect world no, you would not have any issue, but the world isn't perfect. An application might use a system wide resource and assume it has exclusive use of that resource. This is not unheard of for larger applications such as servers. You already mentioned one thing, the port, but as you said you can change that but are you sure that is the only thing? If you are sure than you can run multiple instances without an issue. However there are other resources the application might assume it has exclusive use over, files could be one, that if you run multiple copies this assumption is broken. The application would then most likely not behave as expected.