Giter VIP home page Giter VIP logo

agros's People

Contributors

joehakimrahme avatar saeidw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

saeidw zjarci

agros's Issues

Signals

AGROS should be able to send signals to running jobs, as well as to catch signals itself (it should not exit on ^C!).

Problem is, I still don't know how to do it. I'll focus on parsing the conf file first.

Readline doesn't show "help" builtin

I changed "help" into "hep" and it appeared in the tab-completion suggestions.
Why does Readline treat "help" differently? Are there any special functions for help, we could take advantage of?

[AGROS]rahmu:/home/rahmu/code/AGROS$
? cd env exit hep

If not and it's just a bug, we should correct that. In any case, we cannot have one missing builtin in the list

[Questions] On planification

Q1. Is Agros' intended to be a "real" terminal shell (i.e. like csh, ksh, bash, zsh, etc...) or is it meant to be a program run within another classic shell (i.e. you launch a terminal running bash for example, then you run Agros)?
Q2. I've noticed you can exit Agros using C-c => bash still has control over processes running in the terminal. Isn't that a bit dangerous for an lshell? I guess the answer on how to solve this is largely dependent on Q1.
Q3. Does Agros have a plan? Do some features have priority over others? If so, which?
Q4. What are the real advantages of a limited shell? Can't we do the same thing using sudo, for example?

Finally, a minor low-priority technical issue: I tried running Agros from another laptop at home. It wouldn't compile (this deserves a separate post with more details on the error, but I won't burden you with that for now)

SMAGS SMArt Group Selector

SMAGS is an attempt at getting rid of GLib as a parsing library.

I have decided to use iniparser instead.

GNU Readline

Implementing GNU Readline

Objective:

  • Auto-completion
  • History

Auto completion is only on allowed commands, and in path names.

Ideas

  • Restricting auto completion on paths.

    I'm sure Readline can do that. The ultimate goal being implementing a config_t->forbidden_directories

  • Does readline has a conf file? Do we keep it separate from "agros.conf"?

  • Can some filtering (allowed/forbidden) can be done inside readline?

Prefork mode: Launch simultaneous process

Turn the following code into a function that launches different functions simultaneously.

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char** argv){
  int pid=0;
  int fork_number=NUMBER 

  while (pid == 0 && number > 0){
    pid = fork();
    number--;
 }

  while (1); /* Every process is entering that loop. */


  return EXIT_SUCCESS;
}

Improving the log system

I don't like the way the log system is managed.

Although it relies on syslog(3) and I do wish it remains that way, I wish we could give the user a better flexibility in taking advantage of the syslog system.

One of the things to think about. It should be easy and ergonomic, yet powerful and complete.

Agros test drive

Issues:

  • Typing exit doesn't always exit (sometimes it does, other times it doesn't; related to the segfault?)
  • More complete help file needed (can you do autocompletion? How can it be done)

Recommendations:

  • Folder and file coloring a la bash
  • Keyboard shortcuts (C-L, C-D, C-A, C-E, etc...)
  • Take a look at the bash source code (incorporate pieces of code, too maybe?)

Otherwise, it works! Pretty cool for a project in its infancy

Refactoring parse_config function (again).

In order to prepare for user-based configurations, it would be better to review the whole parse_config process. The header should be something like this:

config_t parse_config (char* user, char* group);

Where config_t is a C structure containing all the info we need. The header could vary (maybe it will return a pointer. Maybe we don't need to give the group as an argument, since it is a little redundant).

Prompt is unsynchronized after first use of '&'

Welcome to AGROS!

[AGROS]rahmu:/home/rahmu/code/AGROS$ ls &
[AGROS]rahmu:/home/rahmu/code/AGROS$ ls: cannot access : No such file or directory

[AGROS]rahmu:/home/rahmu/code/AGROS$
[AGROS]rahmu:/home/rahmu/code/AGROS$
[AGROS]rahmu:/home/rahmu/code/AGROS$
[AGROS]rahmu:/home/rahmu/code/AGROS$ ls
[AGROS]rahmu:/home/rahmu/code/AGROS$ agros agros.conf docs include lib Makefile README src

[AGROS]rahmu:/home/rahmu/code/AGROS$

Syslog

I would like to create a logging system for AGROS, relying on standard Syslog utility. First attempts have shown positive results. Some issues still need taking care of thoug.

The idea would be to have three levels of logging, defined in the conf file:
0- No logging whatsoever
1- Only logs attempts at forbidden commands.
2- Logs every command that did not return success
3- Logs everything.

Implementing job control

It is not necessary to have them in order to publish first version. But if AGROS ever wants to be taken seriously, it needs good job control.

Some issues:

  • Syntax: Do I use the same as bash?
  • Piping: How the hell do you do that??

Allowed builtins

The title says it all.

Do I want every user to have access to setenv/getenv?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.