Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7538371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:06:18+00:00 2026-05-30T07:06:18+00:00

If I ran the ssh command and logged into a server, would there be

  • 0

If I ran the ssh command and logged into a server, would there be any reason to have code call system() since I can run it myself?

Edit: The code I have would be written in C

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:06:19+00:00Added an answer on May 30, 2026 at 7:06 am

    system call will execute the program (with parameters) that you want. A system() call invokes a shell. So from inside of a C program, if you want to remove a file, you can invoke system with "rm filename" as argument (this is just a use case – definitely not how you’d like to delete a file from a C program)
    You should use system() only when you know what you are doing. If a user input is any part of the argument to the system call, you should make sure you are sanitizing your input lest you are opening yourself to command injections.

    An example of a command injections with system call is here

    Alternatives to system are popen and obviously fork+exec.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ran into a problem. I have a spawned thread that must call its finally
I ran into a scenario where LINQ to SQL acts very strangely. I would
i have a working solaris 10 server with ssh and NIS using the following
Ran into an issue today that I have not been able to resolve. I
I ran into this code on Wikipedia : (define (pyth x y k) (*
Ran into a bit of an issue with some jQuery code, but in essence,
Ran into an issue with a class; I have a class that looks like:
Ran across this line of code: FormsAuth = formsAuth ?? new FormsAuthenticationWrapper(); What do
Ran into an Out of Stack Space error trying to serialize an ASP.Net AJAX
Ran into something interesting, want to know if I'm doing something wrong or if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.